OGRDataSource *OGRS57Driver::Open( const char * pszFilename, int bUpdate ) { OGRS57DataSource *poDS; poDS = new OGRS57DataSource; if( !poDS->Open( pszFilename, TRUE ) ) { delete poDS; poDS = NULL; } if( poDS && bUpdate ) { delete poDS; CPLError( CE_Failure, CPLE_OpenFailed, "S57 Driver doesn't support update." ); return NULL; } return poDS; }
GDALDataset *OGRS57Driver::Open( GDALOpenInfo* poOpenInfo ) { if( !OGRS57DriverIdentify(poOpenInfo) ) return NULL; OGRS57DataSource *poDS = new OGRS57DataSource(poOpenInfo->papszOpenOptions); if( !poDS->Open( poOpenInfo->pszFilename ) ) { delete poDS; poDS = NULL; } if( poDS && poOpenInfo->eAccess == GA_Update ) { delete poDS; CPLError( CE_Failure, CPLE_OpenFailed, "S57 Driver doesn't support update." ); return NULL; } return poDS; }