Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/statechart/deep_history.hpp @ 44

Last change on this file since 44 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.1 KB
Line 
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//////////////////////////////////////////////////////////////////////////////
8
9
10
11#include <boost/mpl/bool.hpp>
12#include <boost/static_assert.hpp>
13
14
15
16namespace boost
17{
18namespace statechart
19{
20
21 
22 
23//////////////////////////////////////////////////////////////////////////////
24template< class DefaultState >
25class deep_history
26{
27  public:
28    //////////////////////////////////////////////////////////////////////////
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
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;
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
Note: See TracBrowser for help on using the repository browser.