#include <States.h>
Public Member Functions | |
std::string | stateName () const |
Protected Types | |
typedef boost::statechart::state < MostDerived, Context, InnerInitial, historyMode > | boost_state |
typedef State | my_state |
Protected Member Functions | |
virtual void | entryAction () |
virtual void | exitAction () |
void | safeEntryAction () |
void | safeExitAction () |
State (const std::string stateName, typename boost_state::my_context &c) | |
virtual | ~State () |
Protected Attributes | |
const std::string | stateName_ |
typedef boost::statechart::state<MostDerived, Context, InnerInitial, historyMode> smproxy::State< MostDerived, Context, InnerInitial, historyMode >::boost_state [protected] |
typedef State smproxy::State< MostDerived, Context, InnerInitial, historyMode >::my_state [protected] |
smproxy::State< MostDerived, Context, InnerInitial, historyMode >::State | ( | const std::string | stateName, |
typename boost_state::my_context & | c | ||
) | [inline, protected] |
Definition at line 74 of file States.h.
: boost_state(c), stateName_(stateName) {};
virtual smproxy::State< MostDerived, Context, InnerInitial, historyMode >::~State | ( | ) | [inline, protected, virtual] |
virtual void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::entryAction | ( | ) | [inline, protected, virtual] |
Reimplemented in smproxy::Halted, smproxy::Configuring, smproxy::Ready, smproxy::Stopping, smproxy::Halting, smproxy::Starting, and smproxy::Running.
Definition at line 78 of file States.h.
Referenced by smproxy::State< Configuring, AllOk >::safeEntryAction().
{};
virtual void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::exitAction | ( | ) | [inline, protected, virtual] |
Reimplemented in smproxy::Configuring, smproxy::Stopping, smproxy::Halting, and smproxy::Starting.
Definition at line 79 of file States.h.
Referenced by smproxy::State< Configuring, AllOk >::safeExitAction().
{};
void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::safeEntryAction | ( | ) | [inline, protected] |
Definition at line 83 of file States.h.
{ std::string msg = "Failed to enter " + stateName_ + " state"; try { entryAction(); } catch( xcept::Exception& e ) { XCEPT_DECLARE_NESTED(exception::StateTransition, sentinelException, msg, e ); this->post_event( Fail(sentinelException) ); } catch( std::exception& e ) { msg += ": "; msg += e.what(); XCEPT_DECLARE(exception::StateTransition, sentinelException, msg ); this->post_event( Fail(sentinelException) ); } catch(...) { msg += ": unknown exception"; XCEPT_DECLARE(exception::StateTransition, sentinelException, msg ); this->post_event( Fail(sentinelException) ); } };
void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::safeExitAction | ( | ) | [inline, protected] |
Definition at line 113 of file States.h.
{ std::string msg = "Failed to leave " + stateName_ + " state"; try { exitAction(); } catch( xcept::Exception& e ) { XCEPT_DECLARE_NESTED(exception::StateTransition, sentinelException, msg, e ); this->post_event( Fail(sentinelException) ); } catch( std::exception& e ) { msg += ": "; msg += e.what(); XCEPT_DECLARE(exception::StateTransition, sentinelException, msg ); this->post_event( Fail(sentinelException) ); } catch(...) { msg += ": unknown exception"; XCEPT_DECLARE(exception::StateTransition, sentinelException, msg ); this->post_event( Fail(sentinelException) ); } };
std::string smproxy::State< MostDerived, Context, InnerInitial, historyMode >::stateName | ( | ) | const [inline, virtual] |
const std::string smproxy::State< MostDerived, Context, InnerInitial, historyMode >::stateName_ [protected] |
Definition at line 79 of file States.h.
Referenced by smproxy::State< Configuring, AllOk >::safeEntryAction(), smproxy::State< Configuring, AllOk >::safeExitAction(), and smproxy::State< Configuring, AllOk >::stateName().