x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
def.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\python\def.hpp
旋转
特效
属性
历史版本
// Copyright David Abrahams 2002. // 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) #ifndef DEF_DWA200292_HPP # define DEF_DWA200292_HPP # include
# include
# include
# include
# include
# include
# include
# include
namespace boost { namespace python { namespace detail { namespace error { // Compile-time error messages template
struct multiple_functions_passed_to_def; template <> struct multiple_functions_passed_to_def
{ typedef char type; }; } // // def_from_helper -- // // Use a def_helper to define a regular wrapped function in the current scope. template
void def_from_helper( char const* name, F const& fn, Helper const& helper) { // Must not try to use default implementations except with method definitions. typedef typename error::multiple_functions_passed_to_def< Helper::has_default_implementation >::type assertion; detail::scope_setattr_doc( name, boost::python::make_function( fn , helper.policies() , helper.keywords()) , helper.doc() ); } // // These two overloads discriminate between def() as applied to // regular functions and def() as applied to the result of // BOOST_PYTHON_FUNCTION_OVERLOADS(). The final argument is used to // discriminate. // template
void def_maybe_overloads( char const* name , Fn fn , A1 const& a1 , ...) { detail::def_from_helper(name, fn, def_helper
(a1)); } template
void def_maybe_overloads( char const* name , SigT sig , StubsT const& stubs , detail::overloads_base const*) { scope current; detail::define_with_defaults( name, stubs, current, detail::get_signature(sig)); } template
object make_function1(T fn, ...) { return make_function(fn); } inline object make_function1(object const& x, object const*) { return x; } } template
void def(char const* name, Fn fn) { detail::scope_setattr_doc(name, detail::make_function1(fn, &fn), 0); } template
void def(char const* name, Arg1T arg1, Arg2T const& arg2) { detail::def_maybe_overloads(name, arg1, arg2, &arg2); } template
void def(char const* name, F f, A1 const& a1, A2 const& a2) { detail::def_from_helper(name, f, detail::def_helper
(a1,a2)); } template
void def(char const* name, F f, A1 const& a1, A2 const& a2, A3 const& a3) { detail::def_from_helper(name, f, detail::def_helper
(a1,a2,a3)); } }} // namespace boost::python #endif // DEF_DWA200292_HPP
def.hpp
网页地址
文件地址
上一页
16/85
下一页
下载
( 3 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.