x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
vector_n.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\fusion\container\vector\detail\vector_n.hpp
旋转
特效
属性
历史版本
/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ // No include guard. This file is meant to be included many times #if !defined(FUSION_MACRO_05042005) #define FUSION_MACRO_05042005 #define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n(T##n()) #define FUSION_MEMBER_INIT(z, n, _) m##n(_##n) #define FUSION_COPY_INIT(z, n, _) m##n(other.m##n) #define FUSION_MEMBER_DECL(z, n, _) T##n m##n; #define FUSION_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); #define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n); #define FUSION_AT_IMPL(z, n, _) \ typename add_reference
::type \ at_impl(mpl::int_
) { return this->m##n; } \ typename add_reference
::type>::type \ at_impl(mpl::int_
) const { return this->m##n; } #define FUSION_ITER_DECL_VAR(z, n, _) \ typedef typename result_of::next< \ BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \ BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \ = fusion::next(BOOST_PP_CAT(i, BOOST_PP_DEC(n))); #endif #define N BOOST_PP_ITERATION() template
struct BOOST_PP_CAT(vector_data, N) : sequence_base
{ BOOST_PP_CAT(vector_data, N)() : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param
::type _)) : BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N) const& other) : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {} BOOST_PP_CAT(vector_data, N)& operator=(BOOST_PP_CAT(vector_data, N) const& vec) { BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) return *this; } template
static BOOST_PP_CAT(vector_data, N) init_from_sequence(Sequence const& seq) { typedef typename result_of::begin
::type I0; I0 i0 = fusion::begin(seq); BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _) }; template
struct BOOST_PP_CAT(vector, N) : BOOST_PP_CAT(vector_data, N)< BOOST_PP_CAT(vector, N)
, BOOST_PP_ENUM_PARAMS(N, T)> { typedef BOOST_PP_CAT(vector, N)
this_type; typedef BOOST_PP_CAT(vector_data, N)
base_type; typedef mpl::BOOST_PP_CAT(vector, N)
types; typedef vector_tag fusion_tag; typedef fusion_sequence_tag tag; // this gets picked up by MPL typedef mpl::false_ is_view; typedef random_access_traversal_tag category; typedef mpl::int_
size; BOOST_PP_CAT(vector, N)() {} #if (N == 1) explicit #endif BOOST_PP_CAT(vector, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param
::type _)) : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} template
BOOST_PP_CAT(vector, N)( BOOST_PP_CAT(vector, N)
const& vec) : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {} template
BOOST_PP_CAT(vector, N)( Sequence const& seq #if (N == 1) , typename disable_if
>::type* dummy = 0 #endif ) : base_type(base_type::init_from_sequence(seq)) {} template
BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N)
const& vec) { BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _) return *this; } template
typename disable_if
, this_type&>::type operator=(Sequence const& seq) { typedef typename result_of::begin
::type I0; I0 i0 = fusion::begin(seq); BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _) BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _) return *this; } BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _) template
typename add_reference
::type>::type at_impl(I i) { return this->at_impl(mpl::int_
()); } template
typename add_reference
::type>::type>::type at_impl(I i) const { return this->at_impl(mpl::int_
()); } }; #undef N
vector_n.hpp
网页地址
文件地址
上一页
15/16
下一页
下载
( 5 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.