 |
Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
|
static ParamConstraint Require(const std::initializer_list< std::string > &defaultValue={}, bool required=true)
Constructs a require constraint.
The main class to interface with.
static ParamConstraint Incompatibility(const std::string &incompatibleParameters)
Constructs an incompatibility constraint.
static ParamConstraint Incompatibility(const std::initializer_list< std::string > &incompatibleParameters)
Constructs an incompatibility constraint.
ParamConstraint(bool constrainType, DATA_TYPE requiredType, const std::initializer_list< std::string > &defaultValue, bool required, const std::initializer_list< std::string > &incompatibleParameters)
Whole constructor.
DATA_TYPE requiredType
Constrain the parameter to this value. Requires constrainType to be set to true.
ParamConstraint AddIncompatibilities(const std::string &incompatibleParameters)
Daisychain-method.
bool constrainType
Should this parameter be forced to be of a certain type? Remember to set constrainTo to the wanted ...
ParamConstraint AddRequire(const std::initializer_list< std::string > &defaultValue={}, bool required=true)
Daisychain-method.
ParamConstraint()=default
Empty constructor.
std::vector< std::string > incompatibleParameters
Parameters that are incompatible with this parameter.
ParamConstraint AddIncompatibilities(const std::initializer_list< std::string > &incompatibleParameters)
Daisychain-method.
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.
ParamConstraint AddTypeSafety(DATA_TYPE requiredType, bool constrainType=true)
Daisychain-method.