| 58 | } |
| 59 | |
| 60 | OGRDatasourceProxy* OGRDataAdapter::GetDatasourceProxy(const wxString& ds_name, |
| 61 | GdaConst::DataSourceType ds_type) |
| 62 | { |
| 63 | OGRDatasourceProxy* ds_proxy; |
| 64 | |
| 65 | if (ogr_ds_pool.find(ds_name) != ogr_ds_pool.end()) { |
| 66 | ds_proxy = ogr_ds_pool[ds_name]; |
| 67 | } else { |
| 68 | ds_proxy = new OGRDatasourceProxy(ds_name, ds_type, true); |
| 69 | // if OGRDatasourceProxy is failed to initialized, an exception will |
| 70 | // be thrown and catched, so the line below will not be executed. |
| 71 | // There is no case that ds_proxy = NULL |
| 72 | ogr_ds_pool[ds_name] = ds_proxy; |
| 73 | } |
| 74 | |
| 75 | return ds_proxy; |
| 76 | } |
| 77 | |
| 78 | void OGRDataAdapter::RemoveDatasourceProxy(const wxString& ds_name) |
| 79 | { |
no test coverage detected