itom 1.3.0
ito::ParamHelper Class Reference

List of all members.

Static Public Member Functions

static tCompareResult compareParam (const ito::Param &paramTemplate, const ito::Param &param, 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 validateHWMeta (const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory=false)
static ito::RetVal validateParam (const ito::Param &templateParam, const ito::ParamBase &param, bool strict=true, bool mandatory=false)
static ito::RetVal validateAndCastParam (const ito::Param &templateParam, ito::ParamBase &param, 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 > &paramMap, const QString &key, QMap< QString, ito::Param >::iterator &found, bool errorIfReadOnly)
static ito::RetVal parseParamName (const QString &name, QString &paramName, 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 &param, const bool hasIndex, const int index, ito::RetVal &ret)
static ito::RetVal updateParameters (QMap< QString, ito::Param > &paramMap, const QVector< QSharedPointer< ito::ParamBase > > &values)

Member Function Documentation

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

Parameters:
[in]nameis the raw parameter name
[out]paramNameis the real parameter name (first part of name; part before the first opening bracket ('[') or if not available the first colon (':'))
[out]hasIndexindicates 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]indexis the fixed-point index value or -1 if hasIndex is false
[out]additionalTagis 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.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends