Skip to content

Commit 0b7071e

Browse files
authored
Merge pull request #146 from AetherModel/setting_check
Change output variable names and vastly improve settings checks
2 parents e986c88 + e4fe7de commit 0b7071e

File tree

6 files changed

+534
-372
lines changed

6 files changed

+534
-372
lines changed

include/inputs.h

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,37 @@ class Inputs {
121121
std::vector<std::string> get_satellite_names();
122122
std::vector<precision_t> get_satellite_dts();
123123

124-
std::string get_settings_str(std::string key1);
125-
std::string get_settings_str(std::string key1, std::string key2);
126-
int get_settings(std::string key1, std::string key2);
127-
bool check_settings(std::string key1, std::string key2);
124+
// General get_setting functions with error checks:
125+
std::string get_setting_str(std::string key1);
126+
std::string get_setting_str(std::string key1, std::string key2);
127+
std::string get_setting_str(std::string key1,
128+
std::string key2,
129+
std::string key3);
130+
131+
json get_setting_json(std::string key1);
132+
json get_setting_json(std::string key1, std::string key2);
133+
134+
bool get_setting_bool(std::string key1);
135+
bool get_setting_bool(std::string key1, std::string key2);
136+
bool get_setting_bool(std::string key1, std::string key2, std::string key3);
137+
138+
precision_t get_setting_float(std::string key1);
139+
precision_t get_setting_float(std::string key1, std::string key2);
140+
141+
int64_t get_setting_int(std::string key1);
142+
int64_t get_setting_int(std::string key1, std::string key2);
143+
144+
std::vector<int> get_setting_intarr(std::string key1);
145+
std::vector<int> get_setting_timearr(std::string key1);
146+
147+
// Check settings functions:
128148
bool check_settings(std::string key1);
129-
std::string check_settings_str(std::string key1, std::string key2);
149+
bool check_settings(std::string key1, std::string key2);
150+
130151
std::string check_settings_str(std::string key1);
152+
std::string check_settings_str(std::string key1, std::string key2);
153+
131154
precision_t check_settings_pt(std::string key1, std::string key2);
132-
std::vector<int> get_settings_timearr(std::string key1);
133-
std::vector<int> get_settings_intarr(std::string key1);
134155

135156
/**********************************************************************
136157
\brief Check to see if internal state of class is ok
@@ -181,7 +202,7 @@ class Inputs {
181202
int updated_seed;
182203

183204
/// An internal variable to hold the state of the class
184-
bool IsOk;
205+
bool isOk;
185206

186207
std::vector<std::string> missing_settings;
187208
};

0 commit comments

Comments
 (0)