x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
constructor.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\statechart\detail\constructor.hpp
旋转
特效
属性
历史版本
#ifndef BOOST_STATECHART_DETAIL_CONSTRUCTOR_HPP_INCLUDED #define BOOST_STATECHART_DETAIL_CONSTRUCTOR_HPP_INCLUDED ////////////////////////////////////////////////////////////////////////////// // Copyright 2002-2006 Andreas Huber Doenni // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ////////////////////////////////////////////////////////////////////////////// #include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace boost { namespace statechart { namespace detail { template< class ContextList, class OutermostContextBase > struct constructor; ////////////////////////////////////////////////////////////////////////////// template< class ContextList, class OutermostContextBase > struct outer_constructor { typedef typename mpl::front< ContextList >::type to_construct; typedef typename to_construct::context_ptr_type context_ptr_type; typedef typename to_construct::inner_context_ptr_type inner_context_ptr_type; typedef typename to_construct::inner_initial_list inner_initial_list; typedef typename mpl::pop_front< ContextList >::type inner_context_list; typedef typename mpl::front< inner_context_list >::type::orthogonal_position inner_orthogonal_position; typedef typename mpl::advance< typename mpl::begin< inner_initial_list >::type, inner_orthogonal_position >::type to_construct_iter; typedef typename mpl::erase< inner_initial_list, to_construct_iter, typename mpl::end< inner_initial_list >::type >::type first_inner_initial_list; typedef typename mpl::erase< inner_initial_list, typename mpl::begin< inner_initial_list >::type, typename mpl::next< to_construct_iter >::type >::type last_inner_initial_list; static void construct( const context_ptr_type & pContext, OutermostContextBase & outermostContextBase ) { const inner_context_ptr_type pInnerContext = to_construct::shallow_construct( pContext, outermostContextBase ); to_construct::template deep_construct_inner< first_inner_initial_list >( pInnerContext, outermostContextBase ); constructor< inner_context_list, OutermostContextBase >::construct( pInnerContext, outermostContextBase ); to_construct::template deep_construct_inner< last_inner_initial_list >( pInnerContext, outermostContextBase ); } }; ////////////////////////////////////////////////////////////////////////////// template< class ContextList, class OutermostContextBase > struct inner_constructor { typedef typename mpl::front< ContextList >::type to_construct; typedef typename to_construct::context_ptr_type context_ptr_type; static void construct( const context_ptr_type & pContext, OutermostContextBase & outermostContextBase ) { to_construct::deep_construct( pContext, outermostContextBase ); } }; ////////////////////////////////////////////////////////////////////////////// template< class ContextList, class OutermostContextBase > struct constructor_impl : public mpl::eval_if< mpl::equal_to< mpl::size< ContextList >, mpl::long_< 1 > >, mpl::identity< inner_constructor< ContextList, OutermostContextBase > >, mpl::identity< outer_constructor< ContextList, OutermostContextBase > > > { }; ////////////////////////////////////////////////////////////////////////////// template< class ContextList, class OutermostContextBase > struct constructor : constructor_impl< ContextList, OutermostContextBase >::type {}; ////////////////////////////////////////////////////////////////////////////// template< class CommonContext, class DestinationState > struct make_context_list { typedef typename mpl::reverse< typename mpl::push_front< typename mpl::erase< typename DestinationState::context_type_list, typename mpl::find< typename DestinationState::context_type_list, CommonContext >::type, typename mpl::end< typename DestinationState::context_type_list >::type >::type, DestinationState >::type >::type type; }; } // namespace detail } // namespace statechart } // namespace boost #endif
constructor.hpp
网页地址
文件地址
上一页
2/8
下一页
下载
( 4 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.