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

Method Project

Project.cpp:78–123  ·  view source on GitHub ↗

Constructor for an existing project file */

Source from the content-addressed store, hash-verified

76
77/** Constructor for an existing project file */
78Project::Project(const wxString& proj_fname)
79: is_project_valid(false),
80table_int(0), table_state(0), time_state(0),
81w_man_int(0), w_man_state(0), maplayer_state(0),
82save_manager(0),
83frames_manager(0),cat_classif_manager(0), mean_centers(0), centroids(0),
84voronoi_rook_nbr_gal(0), default_var_name(4), default_var_time(4),
85point_duplicates_initialized(false), point_dups_warn_prev_displayed(false),
86num_records(0), layer_proxy(NULL),
87highlight_state(0), con_map_hl_state(0), pairs_hl_state(0),
88dist_metric(WeightsMetaInfo::DM_euclidean),
89dist_units(WeightsMetaInfo::DU_mile),
90min_1nn_dist_euc(-1), max_1nn_dist_euc(-1), max_dist_euc(-1),
91min_1nn_dist_arc(-1), max_1nn_dist_arc(-1), max_dist_arc(-1),
92sourceSR(NULL), rtree_bbox_ready(false), has_null_geometry(false)
93{
94
95 wxLogMessage("Entering Project::Project (existing project)");
96 //wxLogMessage("%s", proj_fname);
97
98 SetProjectFullPath(proj_fname);
99 bool wd_success = SetWorkingDir(proj_fname);
100 if (!wd_success) {
101 //LOG_MSG("Warning: could not set Working Dir from " + proj_fname);
102 // attempt to set working dir according to standard location
103 wd_success = SetWorkingDir(wxGetHomeDir());
104 if (!wd_success) {
105 //LOG_MSG("Warning: could not set Working Dir to wxGetHomeDir()");
106 }
107 }
108 project_conf = new ProjectConfiguration(proj_fname);
109 LayerConfiguration* layer_conf = project_conf->GetLayerConfiguration();
110 layername = layer_conf->GetName();
111 datasource = layer_conf->GetDataSource();
112
113 is_project_valid = CommonProjectInit();
114 if (is_project_valid)
115 save_manager->SetAllowEnableSave(true);
116
117 if (is_project_valid) {
118 // correct cat classifications in weights manager from Table
119 GetCatClassifManager()->VerifyAgainstTable();
120 }
121
122 wxLogMessage("Exiting Project::Project");
123}
124
125/** Constructor for a newly connected datasource */
126Project::Project(const wxString& proj_title,

Callers

nothing calls this directly

Calls 8

GetLayerConfigurationMethod · 0.80
SetAllowEnableSaveMethod · 0.80
VerifyAgainstTableMethod · 0.80
SetMetaDataSaveNeededMethod · 0.80
GetNameMethod · 0.45
GetDataSourceMethod · 0.45
CloneMethod · 0.45
GetFilePathMethod · 0.45

Tested by

no test coverage detected