OGRDataSource *OGRDGNDriver::Open( const char * pszFilename, int bUpdate ) { OGRDGNDataSource *poDS; poDS = new OGRDGNDataSource(); if( !poDS->Open( pszFilename, TRUE, bUpdate ) || poDS->GetLayerCount() == 0 ) { delete poDS; return NULL; } else return poDS; }
static GDALDataset *OGRDGNDriverOpen( GDALOpenInfo* poOpenInfo ) { if( !OGRDGNDriverIdentify(poOpenInfo) ) return NULL; OGRDGNDataSource *poDS = new OGRDGNDataSource(); if( !poDS->Open( poOpenInfo->pszFilename, TRUE, (poOpenInfo->eAccess == GA_Update) ) || poDS->GetLayerCount() == 0 ) { delete poDS; return NULL; } return poDS; }
OGRDataSource *OGRDGNDriver::CreateDataSource( const char * pszName, char **papszOptions ) { /* -------------------------------------------------------------------- */ /* Return a new OGRDataSource() */ /* -------------------------------------------------------------------- */ OGRDGNDataSource *poDS = NULL; poDS = new OGRDGNDataSource(); if( !poDS->PreCreate( pszName, papszOptions ) ) { delete poDS; return NULL; } else return poDS; }
static GDALDataset *OGRDGNDriverCreate( const char * pszName, CPL_UNUSED int nBands, CPL_UNUSED int nXSize, CPL_UNUSED int nYSize, CPL_UNUSED GDALDataType eDT, char **papszOptions ) { /* -------------------------------------------------------------------- */ /* Return a new OGRDataSource() */ /* -------------------------------------------------------------------- */ OGRDGNDataSource *poDS = NULL; poDS = new OGRDGNDataSource(); if( !poDS->PreCreate( pszName, papszOptions ) ) { delete poDS; return NULL; } else return poDS; }
static GDALDataset *OGRDGNDriverCreate( const char * pszName, int /* nBands */, int /* nXSize */, int /* nYSize */, GDALDataType /* eDT */, char **papszOptions ) { /* -------------------------------------------------------------------- */ /* Return a new OGRDataSource() */ /* -------------------------------------------------------------------- */ OGRDGNDataSource *poDS = NULL; poDS = new OGRDGNDataSource(); if( !poDS->PreCreate( pszName, papszOptions ) ) { delete poDS; return NULL; } return poDS; }