47 template <
class EventType,
class StateType>
60 StringVariantContainerBaseMap setOutputValues =
65 ->_addSourceDictionary(eOutput, setOutputValues)
66 ->_addSourceDictionary(eEvent, event->properties)
71 ev->properties =
event->properties;
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;
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;
#define DEFINEEVENT(NEWEVENT)
this macro declares a new event-class derived vom Event, to have a compiletime check for typos in eve...
An Event is used to communicate between e.g.
void defineParameters() override
Virtual function, in which input/local/output parameters can be specified.
EventPtr eventToSend
Event that is automatically sent when this state is entered.
StatePtr addState(std::string stateName)
Overridden function, which always throws an exception, to forbid the usage of this function here.
void onEnter() override
Virtual function, in which the behaviour of state is defined, when it is entered. Can be overridden,...
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.
This is the standard implementation of FinalStateBase.
static StatePtr createState(const EventPtr &event)
createState creates a finalstate instance with the specified event type.
std::unique_ptr< Impl > impl
StateControllerPtr __getParentState() const
Getter function that automatically casts the parentState member of StateBase into StateControllerPtr.
EventPtr createEvent()
Utility function to create a new Event.
StateParameterMap getInputParameters() override
Returns a new copy of the inputparameters-dictionary, so that the caller cannot modify them (const wo...
StateParameterMap & getOutputParameters() override
getter function to get the map of output parameters
FinalState< Failure > FailureState
State that automatically signals "Failure" to the parent state.
FinalState< Success > SuccessState
State that automatically signals "Success" to the parent state.
void copyDictionary(const StringVariantContainerBaseMap &source, StringVariantContainerBaseMap &destination)
Clears the destination map and copies the parameters of the source in it.
StringVariantContainerBaseMap getSetValues(const StateParameterMap ¶mMap)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< RemoteState > RemoteStatePtr
IceInternal::Handle< State > StatePtr
IceInternal::Handle< Event > EventPtr
Typedef of EventPtr as IceInternal::Handle<Event> for convenience.
DEFINEEVENT(EvInit) struct StateRun
ParameterMappingPtr createMapping()
Returns a new and empty instance of ParameterMapping.