Exemplo n.º 1
0
OGRDataSource *OGRGeoconceptDriver::Open( const char* pszFilename,
                                          int bUpdate )

{
    OGRGeoconceptDataSource  *poDS;

/* -------------------------------------------------------------------- */
/*      We will only consider .gxt and .txt files.                      */
/* -------------------------------------------------------------------- */
    const char* pszExtension = CPLGetExtension(pszFilename);
    if( !EQUAL(pszExtension,"gxt") && !EQUAL(pszExtension,"txt") )
    {
        return NULL;
    }

    poDS = new OGRGeoconceptDataSource();

    if( !poDS->Open( pszFilename, TRUE, bUpdate ) )
    {
        delete poDS;
        return NULL;
    }
    return poDS;
}
Exemplo n.º 2
0
OGRDataSource *OGRGeoconceptDriver::Open( const char* pszFilename,
                                          int bUpdate )

{
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
/* -------------------------------------------------------------------- */
/*      We will only consider .gxt and .txt files.                      */
/* -------------------------------------------------------------------- */
    const char* pszExtension = CPLGetExtension(pszFilename);
    if( !EQUAL(pszExtension,"gxt") && !EQUAL(pszExtension,"txt") )
    {
        return nullptr;
    }
#endif

    OGRGeoconceptDataSource  *poDS = new OGRGeoconceptDataSource();

    if( !poDS->Open( pszFilename, true, CPL_TO_BOOL(bUpdate) ) )
    {
        delete poDS;
        return nullptr;
    }
    return poDS;
}