armarx::StateUtilFunctions Namespace Reference

Functions

bool addToDictionary (EventPtr event, const std::string key, const SingleTypeVariantListPtr &valueList)
 
bool addToDictionary (EventPtr event, const std::string key, const Variant &value)
 Adds the (key,defaulfValue) pair to the event-dictionary.
 
bool checkForCompleteParameters (const StateParameterMap &paramMap, std::string *logOutput=nullptr)
 
void copyDictionary (const StateParameterMap &source, StateParameterMap &destination)
 Clears the destination map and copies the parameters of the source in it.
 
void copyDictionary (const StateParameterMap &source, StringVariantContainerBaseMap &destination)
 Clears the destination map and copies the parameters of the source in it.
 
void copyDictionary (const StringVariantContainerBaseMap &source, StateParameterMap &destination)
 Clears the destination map and copies the parameters of the source in it.
 
void copyDictionary (const StringVariantContainerBaseMap &source, StringVariantContainerBaseMap &destination)
 Clears the destination map and copies the parameters of the source in it.
 
bool equalKeys (const StateParameterMap &dict1, const StateParameterMap &dict2)
 Checks whether the maps have equal keys and equal Types.
 
bool equalKeys (const StringVariantContainerBaseMap &dict1, const StringVariantContainerBaseMap &dict2)
 Checks whether the maps have equal keys and equal Types.
 
void fillDictionary (const StringVariantContainerBaseMap &source, StateParameterMap &destination)
 Tries to fill the destination map with matching entries of the source map. Entries that could not be found, are not changed.
 
void fillDictionary (const StringVariantContainerBaseMap &source, StringVariantContainerBaseMap &destination)
 Tries to fill the destination map with matching entries of the source map. Entries that could not be found, are not changed.
 
std::string getDictionaryString (const StateParameterMap &mymap)
 Converts the map into a string-representation.
 
std::string getDictionaryString (const StringVariantContainerBaseMap &mymap)
 Converts the map into a string-representation.
 
StringVariantContainerBaseMap getSetValues (const StateParameterMap &paramMap)
 
StringVariantContainerBaseMap getValues (const StateParameterMap &paramMap)
 
std::string getVariantString (const VariantBasePtr &var, const std::string &name="")
 
std::string getVariantString (const VariantPtr &var, const std::string &name="")
 
std::string transitionErrorToString (TransitionErrorType type)
 
void unsetParameters (StateParameterMap &paramMap)
 Sets all entries of the given dictionary to the stored default values.
 
bool waitForChannelRefs (const StateParameterMap &paramMap)
 Waits for all ChannelRefs to be initialized in the given Map.
 

Function Documentation

◆ addToDictionary() [1/2]

bool addToDictionary ( EventPtr event,
const std::string key,
const SingleTypeVariantListPtr & valueList )

◆ addToDictionary() [2/2]

bool addToDictionary ( EventPtr event,
const std::string key,
const Variant & value )

Adds the (key,defaulfValue) pair to the event-dictionary.

The type of the entry is determined with defaultValue.

◆ checkForCompleteParameters()

bool checkForCompleteParameters ( const StateParameterMap & paramMap,
std::string * logOutput = nullptr )

◆ copyDictionary() [1/4]

void copyDictionary ( const StateParameterMap & source,
StateParameterMap & destination )

Clears the destination map and copies the parameters of the source in it.

The copies have their own memory.

◆ copyDictionary() [2/4]

void copyDictionary ( const StateParameterMap & source,
StringVariantContainerBaseMap & destination )

Clears the destination map and copies the parameters of the source in it.

The copies have their own memory.

◆ copyDictionary() [3/4]

void copyDictionary ( const StringVariantContainerBaseMap & source,
StateParameterMap & destination )

Clears the destination map and copies the parameters of the source in it.

The copies have their own memory.

◆ copyDictionary() [4/4]

void copyDictionary ( const StringVariantContainerBaseMap & source,
StringVariantContainerBaseMap & destination )

Clears the destination map and copies the parameters of the source in it.

The copies have their own memory.

◆ equalKeys() [1/2]

bool equalKeys ( const StateParameterMap & dict1,
const StateParameterMap & dict2 )

Checks whether the maps have equal keys and equal Types.

◆ equalKeys() [2/2]

bool equalKeys ( const StringVariantContainerBaseMap & dict1,
const StringVariantContainerBaseMap & dict2 )

Checks whether the maps have equal keys and equal Types.

◆ fillDictionary() [1/2]

void fillDictionary ( const StringVariantContainerBaseMap & source,
StateParameterMap & destination )

Tries to fill the destination map with matching entries of the source map. Entries that could not be found, are not changed.

◆ fillDictionary() [2/2]

void fillDictionary ( const StringVariantContainerBaseMap & source,
StringVariantContainerBaseMap & destination )

Tries to fill the destination map with matching entries of the source map. Entries that could not be found, are not changed.

◆ getDictionaryString() [1/2]

std::string getDictionaryString ( const StateParameterMap & mymap)

Converts the map into a string-representation.

◆ getDictionaryString() [2/2]

std::string getDictionaryString ( const StringVariantContainerBaseMap & mymap)

Converts the map into a string-representation.

◆ getSetValues()

StringVariantContainerBaseMap getSetValues ( const StateParameterMap & paramMap)

◆ getValues()

StringVariantContainerBaseMap getValues ( const StateParameterMap & paramMap)

◆ getVariantString() [1/2]

std::string getVariantString ( const VariantBasePtr & var,
const std::string & name = "" )

◆ getVariantString() [2/2]

std::string getVariantString ( const VariantPtr & var,
const std::string & name = "" )

◆ transitionErrorToString()

std::string transitionErrorToString ( TransitionErrorType type)

◆ unsetParameters()

void unsetParameters ( StateParameterMap & paramMap)

Sets all entries of the given dictionary to the stored default values.

◆ waitForChannelRefs()

bool waitForChannelRefs ( const StateParameterMap & paramMap)

Waits for all ChannelRefs to be initialized in the given Map.

Times out after some delay.

Parameters
paramMapparameter map, that is to be checked for initialized ChannelRefs
Returns
true if all ChannelRef are initialized