 |
Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
|
DATA_TYPE
The different data types a paramater can be.
bool required
If set to true, and no default value set, an error will be produced if this parameter is not supplied...
ParamConstraint(const std::string &key, bool constrainType, DATA_TYPE wantedType, const std::vector< std::string > &defaultValue, bool required)
Whole constructor.
static ParamConstraint TypeSafety(const std::string &key, DATA_TYPE wantedType, bool constrainType=true)
Constructs a type-safety constraint.
std::vector< std::string > defaultValue
The default value for this parameter.
static ParamConstraint Require(const std::string &key, const std::vector< std::string > &defaultValue={}, bool required=true)
Constructs a require constraint.
std::string key
The key of the parameter to constrain.
bool constrainType
Should this parameter be forced to be of a certain type? Remember to set constrainTo to the wanted ...
ParamConstraint()=default
Empty constructor.
DATA_TYPE wantedType
Constrain the parameter to this value. Requires constrainType to be set to true.