Added more constructors to ParamConstraint
This commit is contained in:
parent
f2b90f0caa
commit
8afa0bb351
BIN
Hazelnupp.vpp
BIN
Hazelnupp.vpp
Binary file not shown.
@ -6,7 +6,10 @@
|
||||
struct ParamConstraint
|
||||
{
|
||||
public:
|
||||
//! Empty constructor
|
||||
ParamConstraint() = default;
|
||||
|
||||
//! Whole constructor
|
||||
ParamConstraint(const std::string& key, bool constrainType, DATA_TYPE wantedType, const std::vector<std::string>& defaultValue, bool required)
|
||||
:
|
||||
key { key },
|
||||
@ -18,6 +21,26 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
//! Type-Constraint constructor
|
||||
ParamConstraint(const std::string& key, bool constrainType, DATA_TYPE wantedType)
|
||||
:
|
||||
key{ key },
|
||||
constrainType{ constrainType },
|
||||
wantedType{ wantedType }
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//! Require-Constraint constructor
|
||||
ParamConstraint(const std::string& key, const std::vector<std::string>& defaultValue, bool required = false)
|
||||
:
|
||||
key{ key },
|
||||
defaultValue{ defaultValue },
|
||||
required{ required }
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//! The key of the parameter to constrain
|
||||
std::string key;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user