My Project
asynchronous_state_machine.hpp
Go to the documentation of this file.
1 #ifndef BOOST_STATECHART_ASYNCHRONOUS_STATE_MACHINE_HPP_INCLUDED
2 #define BOOST_STATECHART_ASYNCHRONOUS_STATE_MACHINE_HPP_INCLUDED
3 // Copyright 2002-2006 Andreas Huber Doenni
5 // Distributed under the Boost Software License, Version 1.0. (See accompany-
6 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 
9 
10 
15 
16 #include <memory> // std::allocator
17 
18 
19 namespace boost
20 {
21 namespace statechart
22 {
23 
24 
25 
26 class event_base;
27 
28 
29 
31 template< class MostDerived,
32  class InitialState,
33  class Scheduler = fifo_scheduler<>,
34  class Allocator = std::allocator< none >,
35  class ExceptionTranslator = null_exception_translator >
37  MostDerived, InitialState, Allocator, ExceptionTranslator >,
38  public event_processor< Scheduler >
39 {
40  typedef state_machine< MostDerived,
41  InitialState, Allocator, ExceptionTranslator > machine_base;
43  protected:
46 
48  processor_base( ctx )
49  {
50  }
51 
53 
54  public:
56  // The following declarations should be private.
57  // They are only public because many compilers lack template friends.
59  void terminate()
60  {
62  }
63 
64  private:
66  virtual void initiate_impl()
67  {
69  }
70 
71  virtual void process_event_impl( const event_base & evt )
72  {
74  }
75 
76  virtual void terminate_impl()
77  {
79  }
80 };
81 
82 
83 
84 } // namespace statechart
85 } // namespace boost
86 
87 
88 
89 #endif
boost::statechart::event_processor::terminate
void terminate()
Definition: event_processor.hpp:52
boost::statechart::event_processor
Definition: event_processor.hpp:25
fifo_scheduler.hpp
null_exception_translator.hpp
boost::statechart::asynchronous_state_machine
Definition: asynchronous_state_machine.hpp:39
boost
Definition: asynchronous_state_machine.hpp:20
boost::statechart::fifo_scheduler<>
boost::statechart::asynchronous_state_machine::asynchronous_state_machine
asynchronous_state_machine(typename processor_base::my_context ctx)
Definition: asynchronous_state_machine.hpp:47
boost::statechart::state_machine::process_event
void process_event(const event_base_type &evt)
Definition: state_machine.hpp:273
boost::statechart::asynchronous_state_machine::my_base
asynchronous_state_machine my_base
Definition: asynchronous_state_machine.hpp:45
boost::statechart::state_machine
Definition: state_machine.hpp:236
event_processor.hpp
boost::statechart::state_machine::terminate
void terminate()
Definition: state_machine.hpp:259
boost::statechart::asynchronous_state_machine::~asynchronous_state_machine
virtual ~asynchronous_state_machine()
Definition: asynchronous_state_machine.hpp:52
boost::statechart::null_exception_translator
Definition: null_exception_translator.hpp:24
boost::statechart::event_base
Definition: event_base.hpp:51
boost::statechart::asynchronous_state_machine::terminate
void terminate()
Definition: asynchronous_state_machine.hpp:59
boost::statechart::state_machine::initiate
void initiate()
Definition: state_machine.hpp:244
boost::statechart::event_processor::my_context
const Scheduler::processor_context & my_context
Definition: event_processor.hpp:59
state_machine.hpp