62 void addUintParameter(std::string name,
unsigned int *var,
bool required =
true);
77 bool validateParameters(std::ostream &warnOut = std::cout, std::ostream &errOut = std::cerr);
85 _parameter(std::string name, T *val,
bool required =
true,
bool found =
false) : _name(name), _val(val), _required(required), _found(found){}
87 bool operator==(
const _parameter &rhs)
const {
return _name == rhs._name; }
89 bool operator<(
const _parameter &rhs)
const {
return _name.c_str()[0] < rhs._name.c_str()[0]; }
93 out << std::boolalpha << _name <<
"\t\t";
96 out << *_val << std::endl;
100 out <<
"NOT FOUND" << std::endl;
102 out << std::noboolalpha;
112 std::map<std::string, _parameter<int> > _intParameters;
113 std::map<std::string, _parameter<unsigned int> > _uintParameters;
114 std::map<std::string, _parameter<float> > _floatParameters;
115 std::map<std::string, _parameter<double> > _doubleParameters;
116 std::map<std::string, _parameter<bool> > _boolParameters;
120 #endif // INPUTPARSER_H