Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 20 of file atp-config-test.cpp.
References ossim::JsonConfig::diagnosticLevel(), ossimInit::initialize(), ossimInit::instance(), ossim::JsonConfig::loadJSON(), and ATP::AtpConfig::readConfig().
22 clog <<
"ATP Config Test" << endl;
26 AtpConfig& atpConfig = AtpConfig::instance();
27 clog <<
"\nDump of default common ATP params:"<<endl;
28 clog << atpConfig << endl;
32 clog <<
"\nError reading testConfig!"<<endl;
35 clog <<
"\n******************************************************************"<<endl;
36 clog <<
"\nDump of crosscorr ATP params:"<<endl;
37 clog << atpConfig << endl;
41 clog <<
"\nError reading testConfig!"<<endl;
44 clog <<
"\n******************************************************************"<<endl;
45 clog <<
"\nDump of testConfig ATP params:"<<endl;
46 clog << atpConfig << endl;
48 Json::Value shortForm;
49 shortForm[
"myCustomParam"] =
false;
50 shortForm[
"peakThreshold"] = 0.8;
51 shortForm[
"algorithm"] =
"override-test";
52 shortForm[
"newParam"] =
"oops";
53 shortForm[
"diagnosticLevel"] = 3;
55 clog <<
"\n******************************************************************"<<endl;
56 clog <<
"\nDump of short-form ATP params override:"<<endl;
57 clog << atpConfig << endl;
60 clog<<
"\nCorrectly processed diagnostic level."<<endl;
62 clog<<
"\nDiagnostic level test failed."<<endl;
void initialize(int &argc, char **argv)
bool diagnosticLevel(unsigned int level) const
Convenience method returns TRUE if the currently set diagnostic level is <= level.
static ossimInit * instance()
virtual void loadJSON(const Json::Value ¶ms_json_node)
Reads the params controlling the process from the JSON node named "parameters".
bool readConfig(const std::string &configName="")
Singleton class maintaining parameters affecting the automatic tie point generation.