MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / GetDatasourceProxy

Method GetDatasourceProxy

ShapeOperations/OGRDataAdapter.cpp:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60OGRDatasourceProxy* 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
78void OGRDataAdapter::RemoveDatasourceProxy(const wxString& ds_name)
79{

Callers 3

InitFromOgrLayerMethod · 0.80
AddMapLayerMethod · 0.80
OnOpenCRSMethod · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected