CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

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 ()
 
- Public Member Functions inherited from smproxy::State< Stopping, AllOk >
std::string stateName () const
 

Private Attributes

boost::scoped_ptr< boost::thread > stoppingThread_
 

Additional Inherited Members

- Protected Types inherited from smproxy::State< Stopping, AllOk >
typedef
boost::statechart::state
< Stopping, AllOk,
boost::mpl::list
<>, boost::statechart::has_no_history > 
boost_state
 
typedef State my_state
 
- Protected Member Functions inherited from smproxy::State< Stopping, AllOk >
void safeEntryAction ()
 
void safeExitAction ()
 
 State (const std::string stateName, typename boost_state::my_context &c)
 
virtual ~State ()
 
- Protected Attributes inherited from smproxy::State< Stopping, AllOk >
const std::string stateName_
 

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().

319  : my_state("Stopping", c)
320  { safeEntryAction(); }
virtual smproxy::Stopping::~Stopping ( )
inlinevirtual

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().

273  {
274  outermost_context_type& stateMachine = outermost_context();
275  stateMachine.disableConsumerRegistration();
276  boost::this_thread::interruption_point();
277  stateMachine.clearQueues();
278  boost::this_thread::interruption_point();
279  stateMachine.processEvent( StoppingDone() );
280  }
void Stopping::entryAction ( )
virtual

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

Definition at line 264 of file StateMachine.cc.

References activity(), and stoppingThread_.

265  {
266  stoppingThread_.reset(
267  new boost::thread( boost::bind( &Stopping::activity, this) )
268  );
269  }
boost::scoped_ptr< boost::thread > stoppingThread_
Definition: States.h:329
void Stopping::exitAction ( )
virtual

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

Definition at line 283 of file StateMachine.cc.

References stoppingThread_.

284  {
285  stoppingThread_->interrupt();
286  }
boost::scoped_ptr< boost::thread > stoppingThread_
Definition: States.h:329

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().