Go to the documentation of this file.
29 #include <ArmarXCore/interface/observers/VariantBase.h>
30 #include <ArmarXCore/interface/statechart/StatechartIce.h>
42 class ParameterMapping;
65 virtual public ParameterMappingIceBase,
145 void addMappingEntry(MappingSource mappingSource,
const std::string& sourceKey,
const std::string& targetKey, VariantContainerBasePtr
value =
nullptr);
170 StringVariantContainerBaseMap::const_iterator
_hasMappingEntry(
const std::string& keyDestination,
171 const StringVariantContainerBaseMap& sourceDict, MappingSource allowedMappingSource);
172 StringVariantContainerBaseMap::const_iterator
_findSourceEntry(
const std::string sourceKey,
173 const StringVariantContainerBaseMap& sourceDict,
int destWildcardIndex,
const Ice::StringSeq& fieldsDest);
198 ParameterMapping(
const ParameterMapping&
source);
200 void __fillFromMappingSource(MappingSource mappingSource,
StateParameterMap& targetDictionary);
202 void __copyDataFromSourceDict(StringVariantContainerBaseMap::const_iterator& itSourceEntry, StateParameterMap::iterator itTargetEntry);
210 eNoValidMapping(std::string missingKey): LocalException(
std::string(
"armarx::eNoValidMapping: The given mapping is invalid! The key '" + missingKey +
"' could not be mapped.")) {}
~eNoValidMapping() noexcept override
This class maps parameters from several source dictionaries to one input dictionary....
ParameterMappingPtr mapFromParent(const std::string &parentKey, const std::string &targetKey, const Ice::Current &c=Ice::emptyCurrent)
Adds an entry to the ParameterMapping, that maps the sourceKey's value from the parent's input parame...
ParameterMappingPtr mapFromDataField(const DataFieldIdentifierBasePtr &dataFieldIdentifier, const std::string &targetKey, const Ice::Current &c=Ice::emptyCurrent)
Adds an entry to the ParameterMapping, that maps the value of the datafield entry to the targetKey's ...
StringVariantContainerBaseMap::const_iterator _hasMappingEntry(const std::string &keyDestination, const StringVariantContainerBaseMap &sourceDict, MappingSource allowedMappingSource)
Checks wether the mapping has an entry like keyDestination that maps onto a parameter of mapSource.
ParameterMappingPtr _addSourceDictionary(MappingSource mappingSrc, const StringVariantContainerBaseMap &sourceDict, const Ice::Current &c=Ice::emptyCurrent)
static ParameterMappingPtr createMapping()
Creates a new instance of a ParameterMapping. Since the constructors are private, this method must be...
IceInternal::Handle< ParameterMapping > ParameterMappingPtr
static void _addMissingSources(PriorityMap &priorityMap)
ParameterMapping & operator=(const ParameterMapping &rhs)
virtual ParameterMappingPtr clone() const
Returns a new instance of ParameterMapping with the contents of this instance.
ParameterMappingPtr createMapping()
Returns a new and empty instance of ParameterMapping.
::Ice::ObjectPtr ice_clone() const override
Returns a new instance of ParameterMapping with the contents of this instance.
ParameterMappingPtr setSourcePriority(int priorityLevel, MappingSource mappingSrc, const Ice::Current &c=Ice::emptyCurrent)
Adds a priority for a specific source dictionary to the mapping.
void _applyMapping(StateParameterMap &targetDictionary)
This function applies a given mapping to the given inputdictionary.
ParameterMappingPtr mapFromOutput(const std::string &sourceKey, const std::string &targetKey, const Ice::Current &c=Ice::emptyCurrent)
Adds an entry to the ParameterMapping, that maps the sourceKey's value from the output parameters of ...
static void _setStatechartContext(StatechartContext *__context)
StringVariantContainerBaseMap::const_iterator _findSourceEntry(const std::string sourceKey, const StringVariantContainerBaseMap &sourceDict, int destWildcardIndex, const Ice::StringSeq &fieldsDest)
std::shared_ptr< Value > value()
static MappingSource StringToMappingSource(const std::string &mappingSourceString)
void _greedyMapping(StateParameterMap &targetDictionary, StringVariantContainerBaseMap &sourceDictionary)
ParameterMappingPtr setTargetDictToGreedy(bool on=true)
Sets the behaviour of the mapping into the target dictionary to greedy.
QMap< QString, StateParameterPtr > StateParameterMap
This class contains a statechart and provides the interfaces to distributed components.
ParameterMappingPtr mapFromEvent(const std::string &eventKey, const std::string &targetKey, const Ice::Current &c=Ice::emptyCurrent)
Adds an entry to the ParameterMapping, that maps the sourceKey's value from the event parameters of t...
static Ice::StringSeq _getFields(std::string source, char seperator='.')
Takes a string and seperates the string by the seperator-char.
void _fillFromValues(StateParameterMap &targetDictionary)
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
ARMARXCORE_IMPORT_EXPORT ostream & operator<<(ostream &stream, const armarx::RunningTaskIceBase &task)
static std::string MappingSourceToString(MappingSource mappingSource)
void _fillFromDataField(StateParameterMap &targetDictionary)
Base Class for all Logging classes.
~ParameterMapping() override
eNoValidMapping(std::string missingKey)
std::shared_ptr< Object > ObjectPtr
#define ARMARXCORE_IMPORT_EXPORT
This file offers overloads of toIce() and fromIce() functions for STL container types.
void addMappingEntry(MappingSource mappingSource, const std::string &sourceKey, const std::string &targetKey, VariantContainerBasePtr value=nullptr)