1
#ifndef BOOST_STATECHART_DEEP_HISTORY_HPP_INCLUDED
2
#define BOOST_STATECHART_DEEP_HISTORY_HPP_INCLUDED
3
//////////////////////////////////////////////////////////////////////////////
4
// 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)
7
//////////////////////////////////////////////////////////////////////////////
11
#include <boost/mpl/bool.hpp>
12
#include <boost/static_assert.hpp>
23
//////////////////////////////////////////////////////////////////////////////
24
template< class DefaultState >
28
//////////////////////////////////////////////////////////////////////////
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 );
36
//////////////////////////////////////////////////////////////////////////
37
// The following declarations should be private.
38
// They are only public because many compilers lack template friends.
39
//////////////////////////////////////////////////////////////////////////
40
typedef typename DefaultState::outermost_context_base_type
41
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;
47
static void deep_construct(
48
const context_ptr_type & pContext,
49
outermost_context_base_type & outermostContextBase )
51
outermostContextBase.template construct_with_deep_history<
52
DefaultState >( pContext );
58
} // namespace statechart