itom
|
Static Public Member Functions | |
static tCompareResult | compareParam (const ito::Param ¶mTemplate, const ito::Param ¶m, ito::RetVal &ret) |
static tCompareResult | compareMetaParam (const ito::ParamMeta *metaTemplate, const ito::ParamMeta *meta, const char *nameTemplate, const char *name, ito::RetVal &ret) |
validates if the given string value matches a string meta object | |
static ito::RetVal | validateStringMeta (const ito::StringMeta *meta, const char *value, bool mandatory=false, const char *name=nullptr) |
validates if the given double value matches a double meta object | |
static ito::RetVal | validateDoubleMeta (const ito::DoubleMeta *meta, double value, const char *name=nullptr) |
validates if the given double value matches a double meta object | |
static ito::RetVal | validateDoubleMetaAndRoundToStepSize (const ito::DoubleMeta *meta, ito::ParamBase &doubleParam, bool allowRounding=true, const char *name=nullptr) |
validates if the given double value matches a double meta object | |
static ito::RetVal | validateDoubleMetaAndRoundToStepSize (const ito::DoubleMeta *meta, double &value, bool allowRounding=true, const char *name=nullptr) |
static ito::RetVal | validateIntMeta (const ito::IntMeta *meta, int value, const char *name=nullptr) |
static ito::RetVal | validateCharMeta (const ito::CharMeta *meta, char value, const char *name=nullptr) |
static ito::RetVal | validateDObjMeta (const ito::DObjMeta *meta, const ito::DataObject *value, bool mandatory=false, const char *name=nullptr) |
static ito::RetVal | validateCharArrayMeta (const ito::ParamMeta *meta, const char *values, size_t len, const char *name=nullptr) |
static ito::RetVal | validateIntArrayMeta (const ito::ParamMeta *meta, const int *values, size_t len, const char *name=nullptr) |
static ito::RetVal | validateDoubleArrayMeta (const ito::ParamMeta *meta, const double *values, size_t len, const char *name=nullptr) |
static ito::RetVal | validateStringListMeta (const ito::ParamMeta *meta, const ito::ByteArray *values, size_t len, const char *name=nullptr) |
static ito::RetVal | validateHWMeta (const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory=false, const char *name=nullptr) |
static ito::RetVal | validateParam (const ito::Param &templateParam, const ito::ParamBase ¶m, bool strict=true, bool mandatory=false) |
static ito::RetVal | validateAndCastParam (const ito::Param &templateParam, ito::ParamBase ¶m, bool strict=true, bool mandatory=false, bool roundToSteps=false) |
static ito::ParamBase | convertParam (const ito::ParamBase &source, int destType, bool *ok=nullptr) |
static ito::RetVal | getParamFromMapByKey (QMap< QString, ito::Param > ¶mMap, const QString &key, QMap< QString, ito::Param >::iterator &found, bool errorIfReadOnly) |
parses a full parameter name, verifies it and splits it in case of success into its components | |
static ito::RetVal | parseParamName (const QString &key, QString ¶mName, bool &hasIndex, int &index, QString &additionalTag) |
static ito::RetVal | getItemFromArray (const ito::Param &arrayParam, const int index, ito::Param &itemParam) |
static ito::Param | getParam (const ito::Param ¶m, const bool hasIndex, const int index, ito::RetVal &ret) |
static ito::RetVal | updateParameters (QMap< QString, ito::Param > ¶mMap, const QVector< QSharedPointer< ito::ParamBase > > &values) |
Static Private Member Functions | |
static bool | fitToDoubleStepSize (double min, double step, double val) |
static QString | parseNamePrefix (const char *name) |
|
static |
validates if the given string value matches a string meta object
< verifies the meta information of two different parameters for compatibility
|
static |
parses parameter name with respect to regular expression, assigned for parameter-communication with plugins
This method parses any parameter-name with respect to the rules defined for possible names of plugin-parameters.
The regular expression used for the check is "^([a-zA-Z]+\\w*)(\\[(\\d+)\\]){0,1}(:(.*)){0,1}$"
Then the components are:
[0] full string [1] PARAMNAME [2] [INDEX] or empty-string if no index is given [3] INDEX or empty-string if no index is given [4] :ADDITIONALTAG or empty-string if no tag is given [5] ADDITIONALTAG or empty-string if no tag is given
[in] | name | is the raw parameter name |
[out] | paramName | is the real parameter name (first part of name; part before the first opening bracket ('[') or if not available the first colon (':')) |
[out] | hasIndex | indicates whether the name contains an index part (defined by a number within two brackets (e.g. '[NUMBER]'), which has to be appended to the paramName |
[out] | index | is the fixed-point index value or -1 if hasIndex is false |
[out] | additionalTag | is the remaining string of name which is the part after the first colon (':'). If an index part exists, the first colon after the index part is taken. |