예제 #1
0
SDTSAttrReader *SDTSTransfer::GetLayerAttrReader( int iEntry )

{
    SDTSAttrReader      *poAttrReader;
    
    if( iEntry < 0
        || iEntry >= nLayers
        || oCATD.GetEntryType( panLayerCATDEntry[iEntry] ) != SLTAttr )
    {
        return NULL;
    }

    
    poAttrReader = new SDTSAttrReader( &oIREF );
    
    if( !poAttrReader->Open(
                        oCATD.GetEntryFilePath( panLayerCATDEntry[iEntry] ) ) )
    {
        delete poAttrReader;
        return NULL;
    }
    else
    {
        return poAttrReader;
    }
}
예제 #2
0
SDTSAttrReader *SDTSTransfer::GetLayerAttrReader( int iEntry )

{
    if( iEntry < 0
        || iEntry >= nLayers
        || oCATD.GetEntryType( panLayerCATDEntry[iEntry] ) != SLTAttr )
    {
        return nullptr;
    }

    SDTSAttrReader *poAttrReader = new SDTSAttrReader();

    if( !poAttrReader->Open(
                        oCATD.GetEntryFilePath( panLayerCATDEntry[iEntry] ) ) )
    {
        panLayerCATDEntry[iEntry] = SLTUnknown; // to prevent further attempt
        delete poAttrReader;
        return nullptr;
    }

    return poAttrReader;
}