Class CLabelMapHelper#

Nested Relationships#

Nested Types#

Class Documentation#

class CLabelMapHelper#

Label map helper class. This helper class collects the labels of each defined map.

Public Functions

inline void Clear()#

Explicit clearing of the label map might be needed when a local memory manager is used.

Remark

Call this function before the destruction of the memory manager.

template<typename TEnum>
inline bool StoreLabelMap(const std::vector<SLabelLocal> &rseqLabels)#

Store a collection of labels for an enum type.

Attention

Since this function is called before the execution of main(), there is no SDV memory manager available yet. Use the C++ allocation instead (this means conversion needs to be done at a later stage).

Template Parameters:

TEnum – The enum type this label collection is describing.

Parameters:

rseqLabels – Reference to the sequence containing the label-value-pairs.

Returns:

Return ‘true’ to allow an assignment to a static variable during startup.

template<typename TEnum>
inline sequence<SLabelInfo::SLabel> GetLabelMap() const#

Get a previously stored label collection for an enum type.

Template Parameters:

TEnum – The enum type to get the labels for.

Returns:

Reference to a sequence containing the label-value-pairs or an empty sequence when no labels were stored for this enum type.

struct SLabelLocal#

Local version of SLabel.

Public Members

sdv::any_t anyValue#

Label value (must be an integral number)

std::string ssLabel#

Label text.