Class CSdvParamInfo#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class CSdvParamInfo : private sdv::SParamInfo#

Parameter information helper class; used for filling the parameter definition.

Subclassed by sdv::internal::CParamGuardian

Public Functions

template<typename TVar, typename TDefaultType>
CSdvParamInfo(TVar &rtVar, const std::string &rssName, TDefaultType tDefaultVal, const std::string &rssUnit, const std::string &rssCategory, const std::string &rssDescription, uint32_t uiFlags)#

Constructor for automatic parameter type detection.

Template Parameters:
  • TVar – Type of the variable determining the type of information.

  • TDefaultType – Type of the variable of the default value.

Parameters:
  • rtVar[in] Reference to the variable to extract the type from.

  • rssName[in] Reference to the string containing the name of the parameter.

  • tDefaultVal[in] The default value assigned to the parameter.

  • rssUnit[in] Reference to the string containing the unit description.

  • rssCategory[in] Reference to the string containing the name of the group. Can be empty when no group is provided.

  • rssDescription[in] Reference to the string containing the description of the parameter.

  • uiFlags[in] The flags to use with this parameter (extended with read-only for ‘const’ types).

template<typename TVar, typename TDefaultType>
CSdvParamInfo(TVar &rtVar, const std::string &rssName, TDefaultType tDefaultVal, const any_t &ranyLimitLow, bool bIncludeLow, const any_t &ranyLimitHigh, bool bIncludeHigh, const std::string &rssUnit, const std::string &rssCategory, const std::string &rssDescription, uint32_t uiFlags)#

Constructor for numeric values. The parameter type is extracted from the variable type.

Template Parameters:

TVar – Type of the variable determining the type of information.

Parameters:
  • rtVar[in] Reference to the variable to extract the type from.

  • rssName[in] Reference to the string containing the name of the parameter.

  • tDefaultVal[in] The default value assigned to the parameter.

  • ranyLimitLow[in] Reference to the lower limit value or no limit if set to empty.

  • bIncludeLow[in] If there is a lower limit set, the boolean defines how to interpret the limit: when set limit <= value, when not set limit < value.

  • ranyLimitHigh[in] Reference to the higher limit value or no limit if set to empty.

  • bIncludeHigh[in] If there is a higher limit set, the boolean defines how to interpret the limit: when set limit >= value, when not set limit > value.

  • rssUnit[in] Reference to the string containing the unit description.

  • rssCategory[in] Reference to the string containing the name of the group. Can be empty when no group is provided.

  • rssDescription[in] Reference to the string containing the description of the parameter.

  • uiFlags[in] The flags to use with this parameter (extended with read-only for ‘const’ types).

template<typename TVar, typename TDefaultType>
CSdvParamInfo(TVar &rtVar, const std::string &rssName, TDefaultType tDefaultVal, const std::string &rssPattern, const std::string &rssUnit, const std::string &rssCategory, const std::string &rssDescription, uint32_t uiFlags)#

Construct function for string values. The numeric type is extracted from the variable type.

Template Parameters:
  • TVar – Type of the variable determining the type of information.

  • TDefaultType – Type of the variable of the default value.

Parameters:
  • rtVar[in] Reference to the variable to extract the type from.

  • rssName[in] Reference to the string containing the name of the parameter.

  • tDefaultVal[in] The default value assigned to the parameter.

  • rssPattern[in] Reference to the string containing the regular expression describing the pattern the value is allowed to have.

  • rssUnit[in] Reference to the string containing the unit description.

  • rssCategory[in] Reference to the string containing the name of the group. Can be empty when no group is provided.

  • rssDescription[in] Reference to the string containing the description of the parameter.

  • uiFlags[in] The flags to use with this parameter (extended with read-only for ‘const’ types).

template<typename TVar, typename TDefaultType>
CSdvParamInfo(TVar &rtVar, const std::string &rssName, TDefaultType tDefaultVal, const sequence<SLabelInfo::SLabel> &rseqLabels, const std::string &rssCategory, const std::string &rssDescription, uint32_t uiFlags)#

Constructor function for enumerator and bitmask parameters. The parameter type is extracted from the variable type.

Template Parameters:
  • TVar – Type of the variable determining the type of information.

  • TDefaultType – Type of the variable of the default value.

Parameters:
  • rtVar[in] Reference to the variable to extract the type from.

  • rssName[in] Reference to the string containing the name of the parameter.

  • tDefaultVal[in] The default value assigned to the parameter.

  • rseqLabels[in] Reference to the sequence of labels available for the enumerator or bitmask.

  • rssCategory[in] Reference to the string containing the name of the group. Can be empty when no group is provided.

  • rssDescription[in] Reference to the string containing the description of the parameter.

  • uiFlags[in] The flags to use with this parameter (extended with read-only for ‘const’ types).

CSdvParamInfo(const SParamInfo &rInfo)#

Assignment constructor for parameter information structure.

Parameters:

rInfo – Reference to the parameter information structure.

CSdvParamInfo(SParamInfo &&rInfo)#

Move constructor for the parameter information structure.

Parameters:

rInfo – Reference to the parameter information structure.

virtual ~CSdvParamInfo() = default#

Default destructor.

CSdvParamInfo &operator=(const SParamInfo &rsInfo)#

Assignment operator for parameter information.

Parameters:

rsInfo – Reference to the information structure.

Returns:

Reference to this class.

CSdvParamInfo &operator=(SParamInfo &&rsInfo)#

Move operator for parameter information.

Parameters:

rsInfo – Reference to the information structure.

Returns:

Reference to this class.

virtual SParamInfo InfoStruct() const#

Get the parameter information structure.

Returns:

Reference to the parameter information structure.

const u8string &Name() const#

Get the name of the parameter.

Returns:

Reference to the parameter name.

u8string Path() const#

Get the path of the parameter (name and grops together).

Returns:

Path to the parameter.

const any_t &DefaultVal() const#

Get the default value of the parameter.

Returns:

Reference to the default value.

const u8string &Group() const#

Get the group of the parameter.

Returns:

Reference to the parameter group.

const u8string &Description() const#

Get the description of the parameter.

Returns:

Reference to the parameter description.

const u8string &Unit() const#

Get the unit for the parameter.

Returns:

Reference to the parameter unit.

virtual uint32_t Flags() const#

Get the parameter flags.

Returns:

The parameter flags.

bool ReadOnly() const#

Is this a read-only parameter?

Returns:

Returns whether the parameter has a read-only flag.

bool Temporary() const#

Is this a Temporary parameter?

Returns:

Returns whether the parameter has a temporary flag.

virtual bool Dirty() const#

Is the parameter dirty (state value, not available in static param info)?

Returns:

Returns whether the parameter has a dirty flag set.

virtual bool Locked() const#

Is this parameter locked (state value, not available in static param info)?

Returns:

Returns whether the parameter has a locked flag set.

bool Boolean() const#

Is the paratemer a boolean parameter.

Returns:

Returns whether the parameter is boolean.

bool Numeric() const#

Is the paratemer a numeric parameter.

Returns:

Returns whether the parameter is numeric.

bool String() const#

Is the parameter a string parameter.

Returns:

Returns whether the parameter is a string.

bool Enum() const#

Is the parameter an enum parameter.

Returns:

Returns whether the parameter is an enum.

bool Bitmask() const#

Is the parameter a bitmask parameter.

Returns:

Returns whether the parameter is a bitmask.

std::pair<any_t, bool> NumericLimitLow() const#

Get the lower limit for a numeric parameter.

Returns:

Return a pair with the lower limit and a boolean whether the lower limit can be used as a value. The lower limit will be set to empty if the parameter is not numeric or if there is no lower limit set for the parameter.

std::pair<any_t, bool> NumericLimitHigh() const#

Get the higher limit for a numeric parameter.

Returns:

Return a pair with the upper limit and a boolean whether the upper limit can be used as a value. The upper limit will be set to empty if the parameter is not numeric or if there is no upper limit set for the parameter.

std::string StringPattern() const#

Get the string pattern for a string parameter.

Returns:

Return the string pattern or an empty string.

sequence<SLabelInfo::SLabel> EnumBitmaskLabels() const#

Get the labels for an enumerator or bitmask parameter.

Returns:

Returns a sequence with the labels or an empty sequence when the parameter is not an enumerator or a bitmask or there are no labels defined.

Protected Static Functions

template<typename TType>
static constexpr bool TypeIsString()#

Check the type for being a string (standard C++ string, SDV string, character array, character pointer).

Template Parameters:

TType – Type to check for.

Returns:

Returns whether the type is a string.

template<typename TType>
static constexpr bool TypeIsReadOnly()#

Check the type for being read only.

Remark

Character arrays and character pointers are also identified as read only.

Template Parameters:

TType – Type to check for.

Returns:

Returns whether the type is read only.