28 #ifndef configTarget_hpp
29 #define configTarget_hpp
31 #include <unordered_map>
34 #include "../ioutils/stringUtils.hpp"
35 #include "../meta/trueFalseT.hpp"
36 #include "../meta/typeTraits.hpp"
37 #include "../meta/typeDescription.hpp"
39 #include "../mxError.hpp"
84 const std::string &so,
85 const std::string &lo,
87 const std::string & s,
88 const std::string & kw,
90 const std::string & ht =
"",
91 const std::string & he =
"",
std::vector< std::string > values
holds the values in the order they are set by the configuration
bool set
true if the value has been set by the configuration, use to distinguish empty strings
std::string helpExplanation
The explanation to display in the help message.
int clType
The command-line option type, argType::false, argType::true, argType::optional, argType::required.
std::string keyword
The config file keyword, read in a "keyword=value" pair.
int orderAdded
The order in which this was added. Useful for displaying help messages.
int verbosity
Records the verbosity of command line options. E.g. for -v:1, -vv:2, -vvv:3 etc.
configTarget(const std::string &n, const std::string &so, const std::string &lo, int clt, const std::string &s, const std::string &kw, bool isReq=false, const std::string &ht="", const std::string &he="", int oa=0)
Construct and set values.
configTarget()
Default c'tor.
std::string section
The config file section name, can be empty "".
std::string helpType
The type to display in the help message.
std::vector< std::string > sources
holds the sources of the values (command line or config file path)
std::string name
The name of the target.
std::string shortOpt
The command-line short option (e.g. "f" for -f)
std::string longOpt
The command-line long option (e.g. "file" for –file)
bool isRequired
Whether or not this is option is required to be set.