My Project
deep_history.hpp
Go to the documentation of this file.
1 #ifndef BOOST_STATECHART_DEEP_HISTORY_HPP_INCLUDED
2 #define BOOST_STATECHART_DEEP_HISTORY_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 
11 #include <boost/mpl/bool.hpp>
12 #include <boost/static_assert.hpp>
13 
14 
15 
16 namespace boost
17 {
18 namespace statechart
19 {
20 
21 
22 
24 template< class DefaultState >
26 {
27  public:
29  // If you receive a
30  // "use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'" or similar
31  // compiler error here then you forgot to pass either
32  // statechart::has_deep_history or statechart::has_full_history as the
33  // last parameter of DefaultState's context.
34  BOOST_STATIC_ASSERT( DefaultState::context_type::deep_history::value );
35 
37  // The following declarations should be private.
38  // They are only public because many compilers lack template friends.
40  typedef typename DefaultState::outermost_context_base_type
42  typedef typename DefaultState::context_type context_type;
43  typedef typename DefaultState::context_ptr_type context_ptr_type;
44  typedef typename DefaultState::context_type_list context_type_list;
45  typedef typename DefaultState::orthogonal_position orthogonal_position;
46 
47  static void deep_construct(
48  const context_ptr_type & pContext,
49  outermost_context_base_type & outermostContextBase )
50  {
51  outermostContextBase.template construct_with_deep_history<
52  DefaultState >( pContext );
53  }
54 };
55 
56 
57 
58 } // namespace statechart
59 } // namespace boost
60 
61 
62 
63 #endif
boost::statechart::deep_history::context_type_list
DefaultState::context_type_list context_type_list
Definition: deep_history.hpp:44
boost
Definition: asynchronous_state_machine.hpp:20
boost::statechart::deep_history::orthogonal_position
DefaultState::orthogonal_position orthogonal_position
Definition: deep_history.hpp:45
boost::statechart::deep_history::context_type
DefaultState::context_type context_type
Definition: deep_history.hpp:42
boost::statechart::deep_history::outermost_context_base_type
DefaultState::outermost_context_base_type outermost_context_base_type
Definition: deep_history.hpp:41
boost::statechart::deep_history::deep_construct
static void deep_construct(const context_ptr_type &pContext, outermost_context_base_type &outermostContextBase)
Definition: deep_history.hpp:47
boost::statechart::deep_history::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT(DefaultState::context_type::deep_history::value)
boost::statechart::deep_history::context_ptr_type
DefaultState::context_ptr_type context_ptr_type
Definition: deep_history.hpp:43
boost::statechart::deep_history
Definition: deep_history.hpp:26