Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:52:31

0001 #ifndef BOOST_STATECHART_DEEP_HISTORY_HPP_INCLUDED
0002 #define BOOST_STATECHART_DEEP_HISTORY_HPP_INCLUDED
0003 //////////////////////////////////////////////////////////////////////////////
0004 // Copyright 2002-2006 Andreas Huber Doenni
0005 // Distributed under the Boost Software License, Version 1.0. (See accompany-
0006 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 //////////////////////////////////////////////////////////////////////////////
0008 
0009 
0010 
0011 #include <boost/mpl/bool.hpp>
0012 #include <boost/static_assert.hpp>
0013 
0014 
0015 
0016 namespace boost
0017 {
0018 namespace statechart
0019 {
0020 
0021   
0022   
0023 //////////////////////////////////////////////////////////////////////////////
0024 template< class DefaultState >
0025 class deep_history
0026 {
0027   public:
0028     //////////////////////////////////////////////////////////////////////////
0029     // If you receive a 
0030     // "use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'" or similar
0031     // compiler error here then you forgot to pass either
0032     // statechart::has_deep_history or statechart::has_full_history as the
0033     // last parameter of DefaultState's context.
0034     BOOST_STATIC_ASSERT( DefaultState::context_type::deep_history::value );
0035 
0036     //////////////////////////////////////////////////////////////////////////
0037     // The following declarations should be private.
0038     // They are only public because many compilers lack template friends.
0039     //////////////////////////////////////////////////////////////////////////
0040     typedef typename DefaultState::outermost_context_base_type
0041       outermost_context_base_type;
0042     typedef typename DefaultState::context_type context_type;
0043     typedef typename DefaultState::context_ptr_type context_ptr_type;
0044     typedef typename DefaultState::context_type_list context_type_list;
0045     typedef typename DefaultState::orthogonal_position orthogonal_position;
0046 
0047     static void deep_construct(
0048       const context_ptr_type & pContext,
0049       outermost_context_base_type & outermostContextBase )
0050     {
0051       outermostContextBase.template construct_with_deep_history<
0052         DefaultState >( pContext );
0053     }
0054 };
0055 
0056 
0057 
0058 } // namespace statechart
0059 } // namespace boost
0060 
0061 
0062 
0063 #endif