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