Go to the documentation of this file.
25 #include "../RemoteState.h"
26 #include "../StateBase.h"
27 #include "../StateBaseImpl.h"
28 #include "../StateTemplate.h"
29 #include "../StateUtilFunctions.h"
47 template <
class EventType,
class StateType>
60 StringVariantContainerBaseMap setOutputValues =
65 ->_addSourceDictionary(eOutput, setOutputValues)
66 ->_addSourceDictionary(eEvent, event->properties)
71 ev->properties =
event->properties;
72 this->__getParentState()->__substatesFinished(ev);
85 this->StateIceBase::inputParameters);
89 StateParameterMap::iterator it = this->StateIceBase::inputParameters.begin();
91 for (; it != this->StateIceBase::inputParameters.end(); it++)
93 it->second->optionalParam =
true;
111 this->stateType = eFinalState;
112 this->unbreakable =
false;
113 this->greedyInputDictionary =
false;
114 this->
eventToSend = StateUtility::createEvent<EventType>();
118 template <
class derivedClass>
123 "You cannot add substates to a final state!");
131 std::string proxyName,
132 std::string instanceName =
"")
override
135 "You cannot add substates to a final state!");
144 template <
class Event>
157 template <
class EventType = EvDummy>
174 state->setStateName(event->eventName);
175 state->eventToSend = event;
StateParameterMap & getOutputParameters() override
getter function to get the map of output parameters
StateControllerPtr __getParentState() const
Getter function that automatically casts the parentState member of StateBase into StateControllerPtr.
RemoteStatePtr addRemoteState(std::string stateName, std::string proxyName, std::string instanceName="") override
Overridden function, which always throws an exception, to forbid the usage of this function here.
ParameterMappingPtr createMapping()
Returns a new and empty instance of ParameterMapping.
EventPtr eventToSend
Event that is automatically sent when this state is entered.
An Event is used to communicate between e.g. condition handlers and statecharts.
void copyDictionary(const StringVariantContainerBaseMap &source, StringVariantContainerBaseMap &destination)
Clears the destination map and copies the parameters of the source in it.
static StatePtr createState(const EventPtr &event)
createState creates a finalstate instance with the specified event type.
void defineParameters() override
StatePtr addState(std::string stateName)
Overridden function, which always throws an exception, to forbid the usage of this function here.
DEFINEEVENT(EvInit) struct StateRun
StateParameterMap getInputParameters() override
Returns a new copy of the inputparameters-dictionary, so that the caller cannot modify them (const wo...
StringVariantContainerBaseMap getSetValues(const StateParameterMap ¶mMap)
std::unique_ptr< Impl > impl
This file offers overloads of toIce() and fromIce() functions for STL container types.
This is the standard implementation of FinalStateBase.