CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

smproxy::Stopping Class Reference

#include <States.h>

Inheritance diagram for smproxy::Stopping:
smproxy::State< Stopping, AllOk > smproxy::StateName state

List of all members.

Public Types

typedef boost::mpl::list
< boost::statechart::transition
< StoppingDone, Ready > > 
reactions

Public Member Functions

void activity ()
virtual void entryAction ()
virtual void exitAction ()
 Stopping (my_context c)
virtual ~Stopping ()

Private Attributes

boost::scoped_ptr< boost::thread > stoppingThread_

Detailed Description

The Stopping state of the outer-state AllOk.

Definition at line 310 of file States.h.


Member Typedef Documentation

typedef boost::mpl::list< boost::statechart::transition<StoppingDone,Ready> > smproxy::Stopping::reactions

Definition at line 317 of file States.h.


Constructor & Destructor Documentation

smproxy::Stopping::Stopping ( my_context  c) [inline]

Definition at line 319 of file States.h.

References smproxy::State< Stopping, AllOk >::safeEntryAction().

                           : my_state("Stopping", c)
    { safeEntryAction(); }
virtual smproxy::Stopping::~Stopping ( ) [inline, virtual]

Definition at line 321 of file States.h.

References smproxy::State< Stopping, AllOk >::safeExitAction().


Member Function Documentation

void Stopping::activity ( )

Definition at line 272 of file StateMachine.cc.

Referenced by entryAction().

  {
    outermost_context_type& stateMachine = outermost_context();
    stateMachine.disableConsumerRegistration();
    boost::this_thread::interruption_point();
    stateMachine.clearQueues();
    boost::this_thread::interruption_point();
    stateMachine.processEvent( StoppingDone() );
  }
void Stopping::entryAction ( ) [virtual]

Reimplemented from smproxy::State< Stopping, AllOk >.

Definition at line 264 of file StateMachine.cc.

References activity(), and stoppingThread_.

  {
    stoppingThread_.reset(
      new boost::thread( boost::bind( &Stopping::activity, this) )
    );
  }
void Stopping::exitAction ( ) [virtual]

Reimplemented from smproxy::State< Stopping, AllOk >.

Definition at line 283 of file StateMachine.cc.

References stoppingThread_.

  {
    stoppingThread_->interrupt();
  }

Member Data Documentation

boost::scoped_ptr<boost::thread> smproxy::Stopping::stoppingThread_ [private]

Definition at line 329 of file States.h.

Referenced by entryAction(), and exitAction().