x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
get_signature.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\luabind\luabind\detail\get_signature.hpp
旋转
特效
属性
历史版本
// Copyright (c) 2003 Daniel Wallin and Arvid Norberg // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF // ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE // OR OTHER DEALINGS IN THE SOFTWARE. #ifndef LUABIND_NO_ERROR_CHECKING #if !BOOST_PP_IS_ITERATING #ifndef LUABIND_GET_SIGNATURE_HPP_INCLUDED #define LUABIND_GET_SIGNATURE_HPP_INCLUDED #include
#include
#include
#include
#include
#include
#include
#include
#include
namespace luabind { namespace detail { std::string LUABIND_API get_class_name(lua_State* L, LUABIND_TYPE_INFO i); template
std::string name_of_type(by_value
, lua_State* L, int) { return luabind::detail::get_class_name(L, LUABIND_TYPEID(T)); }; template
std::string name_of_type(by_reference
, lua_State* L, int) { return name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + "&"; }; template
std::string name_of_type(by_pointer
, lua_State* L, int) { return name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + "*"; }; template
std::string name_of_type(by_const_reference
, lua_State* L, int) { return "const " + name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + "&"; }; template
std::string name_of_type(by_const_pointer
, lua_State* L, int) { return "const " + name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + "*"; }; inline std::string name_of_type(by_value
, lua_State*, int) { return "object"; }; inline std::string name_of_type(by_const_reference
, lua_State*, int) { return "object"; }; inline std::string name_of_type(by_value
, lua_State*, int) { return "boolean"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "boolean"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "number"; } // template
// inline std::string name_of_type(by_value
>, lua_State* L, long) { return "function<" + name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + ">"; } inline std::string name_of_type(by_value
, lua_State*, int) { return "string"; } inline std::string name_of_type(by_const_pointer
, lua_State*, int) { return "string"; } inline std::string name_of_type(by_pointer
, lua_State*, int) { return "lua_State*"; } template
struct type_name_unless_void { inline static void apply(std::string& s, lua_State* L, bool first) { if (!first) s += ", "; s += name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L); } }; template<> struct type_name_unless_void
{ inline static void apply(std::string&, lua_State*, bool) {} }; #define LUABIND_ADD_LUA_TYPE_NAME(z, n, _) type_name_unless_void
::apply(s, L, false); #define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY,
, 1)) #include BOOST_PP_ITERATE() template
struct get_member_signature { static inline void apply(lua_State* L, std::string& s) { get_member_signature_impl(static_cast
(0), L, s); } }; template
struct get_free_function_signature { static inline void apply(lua_State* L, std::string& s) { get_free_function_signature_impl(static_cast
(0), L, s); } }; template
struct get_signature { static inline void apply(lua_State* L, std::string& s) { get_signature_impl(static_cast
(0), L, s); } }; template
inline void get_signature_impl(const constructor
*, lua_State* L, std::string& s) { s += "("; type_name_unless_void
::apply(s, L, true); BOOST_PP_REPEAT(BOOST_PP_DEC(LUABIND_MAX_ARITY), LUABIND_ADD_LUA_TYPE_NAME, _) s += ")"; } #undef LUABIND_ADD_LUA_TYPE_NAME template
struct get_setter_signature { static void apply(lua_State* L, std::string& s) { s += "("; s += name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L); s += ")"; } }; }} #endif // LUABIND_GET_SIGNATURE_HPP_INCLUDED #elif BOOST_PP_ITERATION_FLAGS() == 1 // member functions template
inline void get_member_signature_impl(T(C::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, std::string& s) { s += "("; #if BOOST_PP_ITERATION() > 0 s += name_of_type(LUABIND_DECORATE_TYPE(A0), L, 0L); BOOST_PP_REPEAT(BOOST_PP_DEC(BOOST_PP_ITERATION()), LUABIND_ADD_LUA_TYPE_NAME, _) #endif s += ")"; } template
inline void get_member_signature_impl(T(C::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) const, lua_State* L, std::string& s) { (void)L; s += "("; #if BOOST_PP_ITERATION() > 0 s += name_of_type(LUABIND_DECORATE_TYPE(A0), L, 0L); BOOST_PP_REPEAT(BOOST_PP_DEC(BOOST_PP_ITERATION()), LUABIND_ADD_LUA_TYPE_NAME, _) #endif s += ") const"; } // const C& obj template
inline void get_member_signature_impl(T(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, std::string& s) { s += "("; #if BOOST_PP_ITERATION() > 0 s += name_of_type(LUABIND_DECORATE_TYPE(A0), L, 0L); BOOST_PP_REPEAT(BOOST_PP_DEC(BOOST_PP_ITERATION()), LUABIND_ADD_LUA_TYPE_NAME, _) #endif s += ")"; } // free functions template
inline void get_free_function_signature_impl(T(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, std::string& s) { (void)f; s += "("; #if BOOST_PP_ITERATION() > 0 s += name_of_type(LUABIND_DECORATE_TYPE(A0), L, 0L); BOOST_PP_REPEAT(BOOST_PP_DEC(BOOST_PP_ITERATION()), LUABIND_ADD_LUA_TYPE_NAME, _) #endif s += ")"; } #endif #endif // LUABIND_NO_ERROR_CHECKING
get_signature.hpp
网页地址
文件地址
上一页
18/43
下一页
下载
( 8 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.