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

Method UpdateProjectConf

Project.cpp:261–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void Project::UpdateProjectConf(ProjectConfiguration* conf)
262{
263 wxLogMessage("Project::UpdateProjectConf()");
264 LayerConfiguration* layer_conf = conf->GetLayerConfiguration();
265 wxString _layername = layer_conf->GetName();
266 IDataSource* _ds = layer_conf->GetDataSource();
267
268 if (layername == _layername) {
269 // we only update Custom Categories
270 // first correct variable_order
271 std::vector<wxString> var_list = layer_proxy->GetFieldNames();
272 std::vector<GdaConst::FieldType> var_types = layer_proxy->GetFieldTypes();
273 VarOrderPtree* variable_order = layer_conf->GetVarOrderPtree();
274 variable_order->CorrectVarGroups(var_list, var_types,
275 IsFieldCaseSensitive());
276 project_conf->GetLayerConfiguration()->SetVariableOrder(variable_order);
277 table_int->Update(*variable_order);
278 } else {
279 wxString msg = _("Update project information failed. \n\nDetails: The layer information defined in project file does no match opened datasource.");
280 throw GdaException(msg.c_str());
281 }
282}
283
284GdaConst::DataSourceType Project::GetDatasourceType()
285{

Callers 1

OnLoadFromGdaMethod · 0.80

Calls 15

GdaExceptionClass · 0.85
GetLayerConfigurationMethod · 0.80
GetFieldNamesMethod · 0.80
GetFieldTypesMethod · 0.80
GetVarOrderPtreeMethod · 0.80
CorrectVarGroupsMethod · 0.80
SetVariableOrderMethod · 0.80
ReInitFromTableIntMethod · 0.80
GetCustClassifPtreeMethod · 0.80
SetCatClassifListMethod · 0.80
GetWeightsManPtreeMethod · 0.80

Tested by

no test coverage detected