4 #ifndef EventFilter_SMProxyServer_States_h
5 #define EventFilter_SMProxyServer_States_h
9 #include "xcept/Exception.h"
11 #include <boost/mpl/list.hpp>
12 #include <boost/thread/thread.hpp>
13 #include <boost/scoped_ptr.hpp>
14 #include <boost/statechart/custom_reaction.hpp>
15 #include <boost/statechart/event.hpp>
16 #include <boost/statechart/state.hpp>
17 #include <boost/statechart/transition.hpp>
59 template<
class MostDerived,
61 class InnerInitial = boost::mpl::list<>,
62 boost::statechart::history_mode historyMode = boost::statechart::has_no_history >
71 typedef boost::statechart::state<MostDerived, Context, InnerInitial, historyMode>
boost_state;
92 XCEPT_DECLARE_NESTED(exception::StateTransition,
93 sentinelException, msg, e );
94 this->post_event(
Fail(sentinelException) );
100 XCEPT_DECLARE(exception::StateTransition,
101 sentinelException, msg );
102 this->post_event(
Fail(sentinelException) );
106 msg +=
": unknown exception";
107 XCEPT_DECLARE(exception::StateTransition,
108 sentinelException, msg );
109 this->post_event(
Fail(sentinelException) );
122 XCEPT_DECLARE_NESTED(exception::StateTransition,
123 sentinelException, msg, e );
124 this->post_event(
Fail(sentinelException) );
130 XCEPT_DECLARE(exception::StateTransition,
131 sentinelException, msg );
132 this->post_event(
Fail(sentinelException) );
136 msg +=
": unknown exception";
137 XCEPT_DECLARE(exception::StateTransition,
138 sentinelException, msg );
139 this->post_event(
Fail(sentinelException) );
159 boost::statechart::transition<Fail,Failed>
178 boost::statechart::transition<Fail,Failed,StateMachine,&StateMachine::failEvent>
198 boost::statechart::transition<Configure,Configuring>
218 boost::statechart::transition<Configure,Configuring>
227 { outermost_context().setExternallyVisibleStateName(
"Halted"); }
241 boost::statechart::transition<ConfiguringDone,Ready>
268 boost::statechart::transition<Enable,Enabled>,
269 boost::statechart::transition<Halt,Halted>
278 { outermost_context().setExternallyVisibleStateName(
"Ready"); }
292 boost::statechart::transition<Stop,Stopping>,
293 boost::statechart::transition<Halt,Halting>
316 boost::statechart::transition<StoppingDone,Ready>
343 boost::statechart::transition<HaltingDone,Halted>
370 boost::statechart::transition<StartingDone,Running>
402 { outermost_context().setExternallyVisibleStateName(
"Enabled"); }
409 #endif //SMProxyServer_States_h
boost::scoped_ptr< boost::thread > configuringThread_
const std::string stateName_
virtual void entryAction()
virtual void exitAction()
Configuring(my_context c)
boost::mpl::list< boost::statechart::transition< Configure, Configuring > > reactions
boost::statechart::state< MostDerived, Context, InnerInitial, historyMode > boost_state
virtual void exitAction()
virtual void entryAction()
Constructed(my_context c)
virtual void entryAction()
virtual void exitAction()
virtual void entryAction()
State(const std::string stateName, typename boost_state::my_context &c)
virtual void entryAction()
boost::scoped_ptr< boost::thread > startingThread_
boost::mpl::list< boost::statechart::transition< Fail, Failed > > reactions
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void entryAction()
std::string stateName() const
boost::scoped_ptr< boost::thread > stoppingThread_
boost::mpl::list< boost::statechart::transition< StartingDone, Running > > reactions
boost::mpl::list< boost::statechart::transition< StoppingDone, Ready > > reactions
boost::mpl::list< boost::statechart::transition< Enable, Enabled >, boost::statechart::transition< Halt, Halted > > reactions
virtual void exitAction()
virtual void entryAction()
boost::mpl::list< boost::statechart::transition< HaltingDone, Halted > > reactions
boost::mpl::list< boost::statechart::transition< ConfiguringDone, Ready > > reactions
virtual void exitAction()
boost::mpl::list< boost::statechart::transition< Stop, Stopping >, boost::statechart::transition< Halt, Halting > > reactions
boost::mpl::list< boost::statechart::transition< Configure, Configuring > > reactions
boost::mpl::list< boost::statechart::transition< Fail, Failed, StateMachine,&StateMachine::failEvent > > reactions
boost::scoped_ptr< boost::thread > haltingThread_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
virtual void entryAction()