mitab/mitab_tabfile.cpp
TABINDFile  *TABFile::GetINDFileRef()
{
    if (m_pszFname == NULL)
        return NULL;

    if (m_eAccessMode == TABRead && m_poINDFile == NULL)
    {
        /*-------------------------------------------------------------
         * File is not opened yet... do it now.
         *
         * Note: We can pass the .TAB's filename directly and the
         * TABINDFile class will automagically adjust the extension.
         *------------------------------------------------------------*/
        m_poINDFile = new TABINDFile;
   
        if ( m_poINDFile->Open(m_pszFname, "r", TRUE) != 0)
        {
            // File could not be opened... probably does not exist
            delete m_poINDFile;
            m_poINDFile = NULL;
        }
        else if (m_panIndexNo && m_poDATFile)
        {
            /*---------------------------------------------------------
             * Pass type information for each indexed field.
             *--------------------------------------------------------*/
            for(int i=0; i<m_poDATFile->GetNumFields(); i++)
            {
                if (m_panIndexNo[i] > 0)
                {
                    m_poINDFile->SetIndexFieldType(m_panIndexNo[i],
                                                   GetNativeFieldType(i));
                }
            }
        }
    }

    return m_poINDFile;
}
/**********************************************************************
 *                   TABFile::GetINDFileRef()
 *
 * Opens the .IND file for this dataset and returns a reference to
 * the handle.  
 * If the .IND file has already been opened then the same handle is 
 * returned directly.
 * If the .IND file does not exist then the function silently returns NULL.
 *
 * Note that the returned TABINDFile handle is only a reference to an
 * object that is owned by this class.  Callers can use it but cannot
 * destroy the object.  The object will remain valid for as long as 
 * the TABFile will remain open.
 **********************************************************************/
:GetINDFileRef()
Opens the .IND file for this dataset and returns a reference to
the handle.
If the .IND file has already been opened then the same handle is
returned directly.
If the .IND file does not exist then the function silently returns NULL.

Note that the returned TABINDFile handle is only a reference to an
object that is owned by this class.  Callers can use it but cannot
destroy the object.  The object will remain valid for as long as
the TABFile will remain open.
: GetINDFileRef () Opens the . IND file for this dataset and returns a reference to the handle . If the . IND file has already been opened then the same handle is returned directly . If the . IND file does not exist then the function silently returns NULL . Note that the returned TABINDFile handle is only a reference to an object that is owned by this class . Callers can use it but cannot destroy the object . The object will remain valid for as long as the TABFile will remain open .
TABINDFile  *TABFile::GetINDFileRef()
{
    if (m_pszFname == NULL)
        return NULL;
    if (m_eAccessMode == TABRead && m_poINDFile == NULL)
    {
        m_poINDFile = new TABINDFile;
        if ( m_poINDFile->Open(m_pszFname, "r", TRUE) != 0)
        {
            delete m_poINDFile;
            m_poINDFile = NULL;
        }
        else if (m_panIndexNo && m_poDATFile)
        {
            for(int i=0; i<m_poDATFile->GetNumFields(); i++)
            {
                if (m_panIndexNo[i] > 0)
                {
                    m_poINDFile->SetIndexFieldType(m_panIndexNo[i],
                                                   GetNativeFieldType(i));
                }
            }
        }
    }
    return m_poINDFile;
}
TABINDFile * TABFile :: GetINDFileRef ( ) { if ( m_pszFname == NULL ) return NULL ; if ( m_eAccessMode == TABRead && m_poINDFile == NULL ) { m_poINDFile = new TABINDFile ; if ( m_poINDFile -> Open ( m_pszFname , " " , TRUE ) != 0 ) { delete m_poINDFile ; m_poINDFile = NULL ; } else if ( m_panIndexNo && m_poDATFile ) { for ( int i = 0 ; i < m_poDATFile -> GetNumFields ( ) ; i ++ ) { if ( m_panIndexNo [ i ] > 0 ) { m_poINDFile -> SetIndexFieldType ( m_panIndexNo [ i ] , GetNativeFieldType ( i ) ) ; } } } } return m_poINDFile ; }
TABFile::GetINDFileRef()
 Opens the .IND file for this dataset and returns a reference to
 the handle.
TABFile :: GetINDFileRef () Opens the . IND file for this dataset and returns a reference to the handle .
/*-------------------------------------------------------------
         * File is not opened yet... do it now.
         *
         * Note: We can pass the .TAB's filename directly and the
         * TABINDFile class will automagically adjust the extension.
         *------------------------------------------------------------*/ // File could not be opened... probably does not exist /*---------------------------------------------------------
             * Pass type information for each indexed field.
             *--------------------------------------------------------*/