亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? call_function.hpp

?? 國(guó)外魔獸世界-NOPserver源碼,2004年版
?? HPP
字號(hào):
// 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.


#if !BOOST_PP_IS_ITERATING

#ifndef LUABIND_CALL_FUNCTION_HPP_INCLUDED
#define LUABIND_CALL_FUNCTION_HPP_INCLUDED

#include <luabind/config.hpp>

#include <boost/mpl/if.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/mpl/or.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum.hpp> 
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>

#include <luabind/detail/convert_to_lua.hpp>
#include <luabind/detail/error.hpp>

namespace luabind
{
	namespace detail
	{



		// if the proxy_function_caller returns non-void
			template<class Ret, class Tuple>
			class proxy_function_caller
			{
//			friend class luabind::object;
			public:

				proxy_function_caller(lua_State* L, const char* name, const Tuple args)
					: m_state(L)
					, m_fun_name(name)
					, m_args(args)
					, m_called(false)
				{
				}

				proxy_function_caller(const proxy_function_caller& rhs)
					: m_state(rhs.m_state)
					, m_fun_name(rhs.m_fun_name)
					, m_args(rhs.m_args)
					, m_called(rhs.m_called)
				{
					rhs.m_called = true;
				}

				~proxy_function_caller()
				{
					if (m_called) return;

					m_called = true;
					lua_State* L = m_state;;

					// get the function
					lua_pushstring(L, m_fun_name);
					lua_gettable(L, LUA_GLOBALSINDEX);

					push_args_from_tuple<1>::apply(L, m_args);
					if (lua_pcall(L, boost::tuples::length<Tuple>::value, 0, 0))
					{ 
#ifndef LUABIND_NO_EXCEPTIONS
						throw luabind::error(L);
#else
						error_callback_fun e = detail::error_callback::get().err;
						if (e) e(L);

						assert(0 && "the lua function threw an error and exceptions are disabled."
									" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();

#endif
					}
				}

				operator Ret()
				{
					typename default_policy::template generate_converter<Ret, lua_to_cpp>::type converter;

					m_called = true;
					lua_State* L = m_state;;
					detail::stack_pop p(L, 1); // pop the return value

					// get the function
					lua_pushstring(L, m_fun_name);
					lua_gettable(L, LUA_GLOBALSINDEX);

					push_args_from_tuple<1>::apply(L, m_args);
					if (lua_pcall(L, boost::tuples::length<Tuple>::value, 1, 0))
					{ 
#ifndef LUABIND_NO_EXCEPTIONS
						throw luabind::error(L); 
#else
						error_callback_fun e = detail::error_callback::get().err;
						if (e) e(L);
	
						assert(0 && "the lua function threw an error and exceptions are disabled."
								" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();
#endif
					}

#ifndef LUABIND_NO_ERROR_CHECKING

					if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0)
					{
#ifndef LUABIND_NO_EXCEPTIONS
						throw cast_failed(L, LUABIND_TYPEID(Ret));
#else
						cast_failed_callback_fun e = detail::error_callback::get().cast;
						if (e) e(L, LUABIND_TYPEID(Ret));

						assert(0 && "the lua function's return value could not be converted."
									" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();

#endif
					}
#endif
					return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1);
				}

				template<class Policies>
				Ret operator[](const Policies& p)
				{
					typedef typename detail::find_conversion_policy<0, Policies>::type converter_policy;
					typename converter_policy::template generate_converter<Ret, lua_to_cpp>::type converter;

					m_called = true;
					lua_State* L = m_state;;
					detail::stack_pop popper(L, 1); // pop the return value

					// get the function
					lua_pushstring(L, m_fun_name);
					lua_gettable(L, LUA_GLOBALSINDEX);

					detail::push_args_from_tuple<1>::apply(L, m_args, p);
					if (lua_pcall(L, boost::tuples::length<Tuple>::value, 1, 0))
					{ 
#ifndef LUABIND_NO_EXCEPTIONS
						throw error(L);
#else
						error_callback_fun e = detail::error_callback::get().err;
						if (e) e(L);
	
						assert(0 && "the lua function threw an error and exceptions are disabled."
								" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();
#endif
					}

#ifndef LUABIND_NO_ERROR_CHECKING

					if (converter.match(L, LUABIND_DECORATE_TYPE(Ret), -1) < 0)
					{
#ifndef LUABIND_NO_EXCEPTIONS
						throw cast_failed(L, LUABIND_TYPEID(Ret));
#else
						cast_failed_callback_fun e = detail::error_callback::get().cast;
						if (e) e(L, LUABIND_TYPEID(Ret));

						assert(0 && "the lua function's return value could not be converted."
									" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();

#endif
					}
#endif
					return converter.apply(L, LUABIND_DECORATE_TYPE(Ret), -1);
				}

			private:

				lua_State* m_state;
				const char* m_fun_name;
				Tuple m_args;
				mutable bool m_called;

			};

		// if the proxy_member_caller returns void
			template<class Tuple>
			class proxy_function_void_caller
			{
			friend class luabind::object;
			public:

				proxy_function_void_caller(lua_State* L, const char* name, const Tuple args)
					: m_state(L)
					, m_fun_name(name)
					, m_args(args)
					, m_called(false)
				{
				}

				proxy_function_void_caller(const proxy_function_void_caller& rhs)
					: m_state(rhs.m_state)
					, m_fun_name(rhs.m_fun_name)
					, m_args(rhs.m_args)
					, m_called(rhs.m_called)
				{
					rhs.m_called = true;
				}

				~proxy_function_void_caller()
				{
					if (m_called) return;

					m_called = true;
					lua_State* L = m_state;;

					// get the function
					lua_pushstring(L, m_fun_name);
					lua_gettable(L, LUA_GLOBALSINDEX);

					push_args_from_tuple<1>::apply(L, m_args);
					if (lua_pcall(L, boost::tuples::length<Tuple>::value, 0, 0))
					{ 
#ifndef LUABIND_NO_EXCEPTIONS
						throw luabind::error(L);
#else
						error_callback_fun e = detail::error_callback::get().err;
						if (e) e(L);
	
						assert(0 && "the lua function threw an error and exceptions are disabled."
								" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();
#endif
					}
				}

				template<class Policies>
				void operator[](const Policies& p)
				{
					m_called = true;
					lua_State* L = m_state;;

					// get the function
					lua_pushstring(L, m_fun_name);
					lua_gettable(L, LUA_GLOBALSINDEX);

					detail::push_args_from_tuple<1>::apply(L, m_args, p);
					if (lua_pcall(L, boost::tuples::length<Tuple>::value, 0, 0))
					{ 
#ifndef LUABIND_NO_EXCEPTIONS
						throw error(L);
#else
						error_callback_fun e = detail::error_callback::get().err;
						if (e) e(L);
	
						assert(0 && "the lua function threw an error and exceptions are disabled."
							" If you want to handle the error you can use luabind::set_error_callback()");
						std::terminate();
#endif
					}
				}

			private:

				lua_State* m_state;
				const char* m_fun_name;
				Tuple m_args;
				mutable bool m_called;

			};

	}

	#define BOOST_PP_ITERATION_PARAMS_1 (4, (0, LUABIND_MAX_ARITY, <luabind/detail/call_function.hpp>, 1))
	#include BOOST_PP_ITERATE()

}

#endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED

#elif BOOST_PP_ITERATION_FLAGS() == 1

#define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
#define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n


	template<class Ret BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	typename boost::mpl::if_<boost::is_void<Ret>
			, luabind::detail::proxy_function_void_caller<boost::tuples::tuple<BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_TUPLE_PARAMS, _)> >
			, luabind::detail::proxy_function_caller<Ret, boost::tuples::tuple<BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_TUPLE_PARAMS, _)> > >::type
	call_function(lua_State* L, const char* name BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_OPERATOR_PARAMS, _) )
	{
		typedef boost::tuples::tuple<BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_TUPLE_PARAMS, _)> tuple_t;
#if BOOST_PP_ITERATION() == 0
		tuple_t args;
#else
		tuple_t args(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), &a));
#endif
		typedef typename boost::mpl::if_<boost::is_void<Ret>
			, luabind::detail::proxy_function_void_caller<boost::tuples::tuple<BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_TUPLE_PARAMS, _)> >
			, luabind::detail::proxy_function_caller<Ret, boost::tuples::tuple<BOOST_PP_ENUM(BOOST_PP_ITERATION(), LUABIND_TUPLE_PARAMS, _)> > >::type proxy_type;
		
		return proxy_type(L, name, args);
	}

#undef LUABIND_OPERATOR_PARAMS
#undef LUABIND_TUPLE_PARAMS


#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区中文字幕| 久久精品国产精品亚洲综合| 色综合久久88色综合天天免费| 欧美一卡二卡在线| 一区二区三区视频在线观看| 成人精品在线视频观看| 日韩免费观看2025年上映的电影| 亚洲欧美日韩精品久久久久| 亚洲精品在线免费观看视频| 视频一区免费在线观看| 欧美在线播放高清精品| 亚洲综合激情网| 欧美色网站导航| 爽爽淫人综合网网站| 日韩三级在线免费观看| 久久福利视频一区二区| www亚洲一区| 风间由美一区二区av101| 国产精品免费视频观看| 色综合天天做天天爱| 婷婷国产在线综合| 国产激情一区二区三区四区 | 久久免费视频色| 91免费观看在线| 亚洲电影第三页| 国产欧美日韩三区| 一本色道a无线码一区v| 日韩av不卡一区二区| 久久午夜色播影院免费高清| 色综合久久中文综合久久牛| 麻豆精品一二三| 91黄色免费版| 粉嫩蜜臀av国产精品网站| 亚洲蜜臀av乱码久久精品蜜桃| 欧美裸体一区二区三区| 国产精华液一区二区三区| 一区二区欧美在线观看| 精品少妇一区二区三区在线播放| 成人app软件下载大全免费| 日本视频一区二区三区| 亚洲色图欧洲色图| 久久久99精品久久| 555www色欧美视频| 色综合久久久久综合体| 久久se精品一区二区| 亚洲午夜久久久久久久久久久| 久久中文字幕电影| 精品美女在线播放| 日韩欧美第一区| 日韩欧美国产综合| 在线综合视频播放| 欧美日韩国产精选| 欧美日韩精品系列| 欧美一区二区三区免费观看视频| 欧美日韩免费高清一区色橹橹 | 午夜日韩在线电影| 亚洲乱码中文字幕综合| 亚洲丝袜精品丝袜在线| 亚洲欧美日韩成人高清在线一区| 中文字幕一区二区三区在线不卡 | 7777精品伊人久久久大香线蕉 | 国产成人高清视频| 国产a区久久久| 91年精品国产| 欧美日韩www| 日韩欧美二区三区| 国产日韩av一区二区| 综合电影一区二区三区| 国产精品美女久久久久高潮| 亚洲精品五月天| 一区二区三区四区不卡视频| 日韩影院精彩在线| 亚洲国产精品视频| 麻豆精品视频在线| 国产精品一二一区| 日本黄色一区二区| 日韩精品一区在线| 亚洲人成精品久久久久| 天天av天天翘天天综合网| 国产尤物一区二区| 欧美日韩一区三区| 中文一区二区完整视频在线观看| 一区二区三区不卡视频在线观看| 美女脱光内衣内裤视频久久网站 | 国产一本一道久久香蕉| 91久久精品一区二区| 久久精品在这里| 青青草国产精品97视觉盛宴| 色哟哟一区二区在线观看| 欧美va在线播放| 天堂在线一区二区| 99免费精品视频| 中文字幕国产精品一区二区| 免费av网站大全久久| 欧美美女激情18p| 亚洲一区在线观看网站| 不卡av在线网| 中文字幕一区二区三区蜜月 | 精品一区二区久久| 欧美一区二区三区爱爱| 美国欧美日韩国产在线播放| 欧美日韩国产一二三| 亚洲永久免费视频| 欧美亚洲一区二区在线| 亚洲精品国久久99热| 91国偷自产一区二区使用方法| 综合婷婷亚洲小说| 99国产精品国产精品毛片| 日韩视频免费观看高清在线视频| 国产一区二区三区蝌蚪| 亚洲国产乱码最新视频 | 国产精品免费av| 欧美大胆人体bbbb| 精品视频免费在线| 99久久er热在这里只有精品15| 麻豆国产欧美一区二区三区| 一区二区三区.www| 亚洲美女一区二区三区| 国产精品区一区二区三| 久久久久亚洲综合| 久久综合久久久久88| 日韩一区二区三区av| 欧美男人的天堂一二区| 欧美午夜精品一区| 国产乱码精品一区二区三| 精品入口麻豆88视频| 成人免费视频视频| 天天综合网天天综合色| 久久久久久99精品| 欧美视频完全免费看| 波多野结衣亚洲一区| 日本va欧美va精品发布| 亚洲精品视频在线看| 26uuu另类欧美亚洲曰本| 在线免费观看不卡av| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 视频一区欧美日韩| 国产精品乱码一区二区三区软件| 在线亚洲一区观看| zzijzzij亚洲日本少妇熟睡| 国产成人精品亚洲午夜麻豆| 日本不卡123| 久久精品国产亚洲a| 午夜视频在线观看一区二区| 一区二区三区毛片| 亚洲欧美一区二区视频| 国产欧美日本一区二区三区| 精品成人一区二区| 2024国产精品| 久久综合九色综合欧美98| 欧美电视剧在线看免费| 精品久久久久香蕉网| 国产色产综合产在线视频| 久久久亚洲高清| 国产精品三级av在线播放| 亚洲少妇最新在线视频| 亚洲免费av高清| 日韩精品91亚洲二区在线观看| 国产99久久久国产精品| 99久久国产综合色|国产精品| 国产乱码精品一区二区三区忘忧草 | 国产一区二区精品久久99| 中文字幕亚洲区| 国产视频一区二区在线| 亚洲欧洲日产国码二区| 欧美一区二区在线播放| 欧美一区二区成人6969| 精品第一国产综合精品aⅴ| 精品国产免费一区二区三区四区| 久久久久久久一区| 一区二区三区中文字幕在线观看| 日韩电影在线免费观看| 国产精一区二区三区| 欧美日韩视频第一区| 国产精品情趣视频| 午夜精品成人在线| 99久久婷婷国产| 日韩写真欧美这视频| 亚洲综合在线视频| 国产精品一区二区在线观看网站 | 91.xcao| 一区二区三区国产豹纹内裤在线| 激情综合色综合久久综合| 欧美色偷偷大香| 亚洲美女少妇撒尿| 国产成人在线电影| 久久这里只有精品视频网| 日韩黄色一级片| 精品视频免费看| 亚洲大尺度视频在线观看| 91视频免费看| 亚洲色图在线播放| jizz一区二区| 中文字幕不卡在线播放| 国产69精品久久99不卡| 久久精品视频在线看| 国产黄人亚洲片| 久久亚洲综合色一区二区三区| 日韩精品久久久久久| 久久综合色8888|