CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
smproxy::State< MostDerived, Context, InnerInitial, historyMode > Class Template Reference

#include <States.h>

Inheritance diagram for smproxy::State< MostDerived, Context, InnerInitial, historyMode >:
smproxy::StateName

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_
 

Detailed Description

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
class smproxy::State< MostDerived, Context, InnerInitial, historyMode >

Definition at line 63 of file States.h.

Member Typedef Documentation

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
typedef boost::statechart::state<MostDerived, Context, InnerInitial, historyMode> smproxy::State< MostDerived, Context, InnerInitial, historyMode >::boost_state
protected

Definition at line 71 of file States.h.

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
typedef State smproxy::State< MostDerived, Context, InnerInitial, historyMode >::my_state
protected

Definition at line 72 of file States.h.

Constructor & Destructor Documentation

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
smproxy::State< MostDerived, Context, InnerInitial, historyMode >::State ( const std::string  stateName,
typename boost_state::my_context &  c 
)
inlineprotected

Definition at line 74 of file States.h.

74  :
const std::string stateName_
Definition: States.h:79
boost::statechart::state< MostDerived, Context, InnerInitial, historyMode > boost_state
Definition: States.h:71
std::string stateName() const
Definition: States.h:67
template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
virtual smproxy::State< MostDerived, Context, InnerInitial, historyMode >::~State ( )
inlineprotectedvirtual

Definition at line 76 of file States.h.

76 {};

Member Function Documentation

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
virtual void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::entryAction ( )
inlineprotectedvirtual
template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
virtual void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::exitAction ( )
inlineprotectedvirtual
template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::safeEntryAction ( )
inlineprotected

Definition at line 83 of file States.h.

84  {
85  std::string msg = "Failed to enter " + stateName_ + " state";
86  try
87  {
88  entryAction();
89  }
90  catch( xcept::Exception& e )
91  {
92  XCEPT_DECLARE_NESTED(exception::StateTransition,
93  sentinelException, msg, e );
94  this->post_event( Fail(sentinelException) );
95  }
96  catch( std::exception& e )
97  {
98  msg += ": ";
99  msg += e.what();
100  XCEPT_DECLARE(exception::StateTransition,
101  sentinelException, msg );
102  this->post_event( Fail(sentinelException) );
103  }
104  catch(...)
105  {
106  msg += ": unknown exception";
107  XCEPT_DECLARE(exception::StateTransition,
108  sentinelException, msg );
109  this->post_event( Fail(sentinelException) );
110  }
111  };
const std::string stateName_
Definition: States.h:79
reject
Definition: HLTenums.h:23
virtual void entryAction()
Definition: States.h:78
template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
void smproxy::State< MostDerived, Context, InnerInitial, historyMode >::safeExitAction ( )
inlineprotected

Definition at line 113 of file States.h.

114  {
115  std::string msg = "Failed to leave " + stateName_ + " state";
116  try
117  {
118  exitAction();
119  }
120  catch( xcept::Exception& e )
121  {
122  XCEPT_DECLARE_NESTED(exception::StateTransition,
123  sentinelException, msg, e );
124  this->post_event( Fail(sentinelException) );
125  }
126  catch( std::exception& e )
127  {
128  msg += ": ";
129  msg += e.what();
130  XCEPT_DECLARE(exception::StateTransition,
131  sentinelException, msg );
132  this->post_event( Fail(sentinelException) );
133  }
134  catch(...)
135  {
136  msg += ": unknown exception";
137  XCEPT_DECLARE(exception::StateTransition,
138  sentinelException, msg );
139  this->post_event( Fail(sentinelException) );
140  }
141  };
const std::string stateName_
Definition: States.h:79
reject
Definition: HLTenums.h:23
virtual void exitAction()
Definition: States.h:79
template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
std::string smproxy::State< MostDerived, Context, InnerInitial, historyMode >::stateName ( ) const
inlinevirtual

Implements smproxy::StateName.

Definition at line 67 of file States.h.

68  { return stateName_; }
const std::string stateName_
Definition: States.h:79

Member Data Documentation

template<class MostDerived, class Context, class InnerInitial = boost::mpl::list<>, boost::statechart::history_mode historyMode = boost::statechart::has_no_history>
const std::string smproxy::State< MostDerived, Context, InnerInitial, historyMode >::stateName_
protected