CMS 3D CMS Logo

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 state

List of all members.

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 
) [inline, protected]

Definition at line 74 of file States.h.

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 ( ) [inline, protected, virtual]

Definition at line 76 of file States.h.

{};

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 ( ) [inline, protected, virtual]
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 ( ) [inline, protected, virtual]
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 ( ) [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) );
      }
    };
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 ( ) [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) );
      }
    };
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 [inline, virtual]

Implements smproxy::StateName.

Definition at line 67 of file States.h.

    { return stateName_; }

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]