 |
Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
|
ParamConstraint(bool constrainType, DATA_TYPE wantedType, const std::vector< std::string > &defaultValue, bool required)
Whole constructor.
The main class to interface with.
DATA_TYPE wantedType
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...
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.
static ParamConstraint TypeSafety(DATA_TYPE wantedType, bool constrainType=true)
Constructs a type-safety constraint.