itom 2.0.0
|
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) |
static ito::RetVal | validateStringMeta (const ito::StringMeta *meta, const char *value, bool mandatory=false) |
static ito::RetVal | validateDoubleMeta (const ito::DoubleMeta *meta, double value) |
static ito::RetVal | validateDoubleMetaAndRoundToStepSize (const ito::DoubleMeta *meta, ito::ParamBase &doubleParam, bool allowRounding=true) |
static ito::RetVal | validateDoubleMetaAndRoundToStepSize (const ito::DoubleMeta *meta, double &value, bool allowRounding=true) |
static ito::RetVal | validateIntMeta (const ito::IntMeta *meta, int value) |
static ito::RetVal | validateCharMeta (const ito::CharMeta *meta, char value) |
static ito::RetVal | validateCharArrayMeta (const ito::ParamMeta *meta, const char *values, size_t len) |
static ito::RetVal | validateIntArrayMeta (const ito::ParamMeta *meta, const int *values, size_t len) |
static ito::RetVal | validateDoubleArrayMeta (const ito::ParamMeta *meta, const double *values, size_t len) |
static ito::RetVal | validateHWMeta (const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory=false) |
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=NULL) |
static ito::RetVal | getParamFromMapByKey (QMap< QString, ito::Param > ¶mMap, const QString &key, QMap< QString, ito::Param >::iterator &found, bool errorIfReadOnly) |
static ito::RetVal | parseParamName (const QString &name, QString ¶mName, bool &hasIndex, int &index, QString &additionalTag) |
parses parameter name with respect to regular expression, assigned for parameter-communcation with plugins | |
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) |
ito::RetVal ito::ParamHelper::parseParamName | ( | const QString & | name, |
QString & | paramName, | ||
bool & | hasIndex, | ||
int & | index, | ||
QString & | additionalTag | ||
) | [static] |
parses parameter name with respect to regular expression, assigned for parameter-communcation 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. |