Go to the documentation of this file.
30 #include <ArmarXCore/interface/observers/VariantBase.h>
31 #include <ArmarXCore/interface/statechart/StatechartIce.h>
40 class ParameterMapping;
97 MappingSource mappingSrc,
98 const Ice::Current&
c = Ice::emptyCurrent);
109 const std::string& targetKey,
110 const Ice::Current&
c = Ice::emptyCurrent);
112 const Ice::Current&
c = Ice::emptyCurrent);
123 const std::string& targetKey,
124 const Ice::Current&
c = Ice::emptyCurrent);
126 const Ice::Current&
c = Ice::emptyCurrent);
137 const std::string& targetKey,
138 const Ice::Current&
c = Ice::emptyCurrent);
140 const Ice::Current&
c = Ice::emptyCurrent);
150 const std::string& targetKey,
151 const Ice::Current&
c = Ice::emptyCurrent);
154 const std::string& sourceKey,
155 const std::string& targetKey,
156 VariantContainerBasePtr
value =
nullptr);
172 template <
class EventType,
class StateType>
185 StringVariantContainerBaseMap::const_iterator
187 const StringVariantContainerBaseMap& sourceDict,
188 MappingSource allowedMappingSource);
189 StringVariantContainerBaseMap::const_iterator
191 const StringVariantContainerBaseMap& sourceDict,
192 int destWildcardIndex,
193 const Ice::StringSeq& fieldsDest);
209 StringVariantContainerBaseMap& sourceDictionary);
214 const StringVariantContainerBaseMap& sourceDict,
215 const Ice::Current&
c = Ice::emptyCurrent);
226 const ParameterMapping&
229 void __fillFromMappingSource(MappingSource mappingSource,
232 void __copyDataFromSourceDict(StringVariantContainerBaseMap::const_iterator& itSourceEntry,
233 StateParameterMap::iterator itTargetEntry);
243 std::string(
"armarx::eNoValidMapping: The given mapping is invalid! The key '" +
244 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)