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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? signature_match.hpp

?? 國外魔獸世界-NOPserver源碼,2004年版
?? 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.


#if !BOOST_PP_IS_ITERATING

#ifndef LUABIND_SIGNATURE_MATCH_HPP_INCLUDED
#define LUABIND_SIGNATURE_MATCH_HPP_INCLUDED

#include <luabind/config.hpp>

#include <boost/config.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_params_with_a_default.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/preprocessor/cat.hpp>

#include <boost/mpl/vector.hpp>
#include <boost/mpl/for_each.hpp>
#include <boost/mpl/size.hpp>
#include <boost/type_traits.hpp>

#include <luabind/detail/primitives.hpp>
#include <luabind/detail/object_rep.hpp>
#include <luabind/detail/class_rep.hpp>
#include <luabind/detail/policy.hpp>

namespace luabind
{

	namespace detail
	{
		template<class A>
		struct constructor_arity_helper
		{
			BOOST_STATIC_CONSTANT(int, value = 1);
		};

		template<>
		struct constructor_arity_helper<luabind::detail::null_type>
		{
			BOOST_STATIC_CONSTANT(int, value = 0);
		};
	}


#define LUABIND_SUM(z, n, _) detail::constructor_arity_helper<A##n >::value + 

	template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(LUABIND_MAX_ARITY, class A, detail::null_type)>
	struct constructor
	{
		BOOST_STATIC_CONSTANT(int, arity = BOOST_PP_REPEAT(LUABIND_MAX_ARITY, LUABIND_SUM, _) 0);
	};

#undef LUABIND_SUM
}

namespace luabind { namespace detail
{
	template<class A, int Index, class Policies>
	struct match_single_param_base
	{
		static inline bool apply(lua_State*L, int& m, int start_index)
		{
			typedef typename find_conversion_policy<Index + 1, Policies>::type converter_policy;
			typedef typename converter_policy::template generate_converter<A, lua_to_cpp>::type converter;
			int r = converter::match(L, LUABIND_DECORATE_TYPE(A), Index + start_index);
			if (r < 0) return true;
			m += r;
			return false;
		}
	};

	template<class A, int Index, class Policies>
	struct match_single_param_base_nada
	{
		static inline bool apply(lua_State*L, int& m, int start_index)
		{
			return false;
		}
	};

	template<class A, int Index, class Policies>
	struct match_single_param
		: boost::mpl::if_<boost::is_same<A, luabind::detail::null_type>
			, match_single_param_base_nada<A,Index,Policies>
			, match_single_param_base<A,Index,Policies>
			>::type
	{
	};

#define LUABIND_MATCH_DECL(z,n,_) typedef typename find_conversion_policy<n + 1, Policies>::type BOOST_PP_CAT(converter_policy,n); \
	typedef typename BOOST_PP_CAT(converter_policy,n)::template generate_converter<BOOST_PP_CAT(A,n), lua_to_cpp>::type BOOST_PP_CAT(converter,n); \
	int BOOST_PP_CAT(r,n) = BOOST_PP_CAT(converter,n)::match(L, LUABIND_DECORATE_TYPE(BOOST_PP_CAT(A,n)), start_index + n);\
	if (BOOST_PP_CAT(r,n) < 0) return -1; \
	else m += BOOST_PP_CAT(r,n);

#define LUABIND_MATCH_PARAM(z, n, _) if (match_single_param<A##n, n, Policies>::apply(L, m, start_index)) return -1;

	template<int N> struct match_constructor;

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

#undef LUABIND_MATCH_DECL

	// this is a function that checks if the lua stack (starting at the given start_index) matches
	// the types in the constructor type given as 3:rd parameter. It uses the Policies given as
	// 4:th parameter to do the matching. It returns the total number of cast-steps that needs to
	// be taken in order to match the parameters on the lua stack to the given parameter-list. Or,
	// if the parameter doesn't match, it returns -1.
	template<BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, class A), class Policies>
	int match_params(lua_State*L, int start_index, const constructor<BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, A)>* c, const Policies* p)
	{

		typedef constructor<BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, A)> sig_t;
//		int m = 0;
//		BOOST_PP_REPEAT(LUABIND_MAX_ARITY, LUABIND_MATCH_PARAM, _);
//		return m;
		return match_constructor<sig_t::arity>::apply(L, start_index, c, p);
	}

#undef LUABIND_MATCH_PARAMS


	template<class Sig, int StartIndex, class Policies>
	struct constructor_match
	{
		inline static int apply(lua_State* L)	
		{
			int top = lua_gettop(L) - StartIndex + 1;
			if (top != Sig::arity) return -1;

			return match_params(L, StartIndex, reinterpret_cast<Sig*>(0), reinterpret_cast<Policies*>(0));
		}};

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

}}

#endif // LUABIND_SIGNATURE_MATCH_HPP_INCLUDED

#elif BOOST_PP_ITERATION_FLAGS() == 1

// non-member functions

	// non-const non-member function this as a pointer
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(*)(T* BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, bool const_object, const Policies* policies)
	{
		if (const_object/* || lua_gettop(L) != BOOST_PP_ITERATION() + 1*/) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		return match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
	}

	// const non-member function this as a pointer
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(*)(const T* BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, bool const_object, const Policies* policies)
	{
		//if (lua_gettop(L) != BOOST_PP_ITERATION() + 1) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		int m = match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
		return const_object ? m : m + 1;
	}

	// non-const non-member function this as a reference
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(*)(T& BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, bool const_object, const Policies* policies)
	{
		if (const_object/* || lua_gettop(L) != BOOST_PP_ITERATION() + 1*/) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		return match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
	}

	// const non-member function this as a reference
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(*)(const T& BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, bool const_object, const Policies* policies)
	{
		//if (lua_gettop(L) != BOOST_PP_ITERATION() + 1) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		int m = match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
		return const_object ? m : m + 1;
	}

	// member functions

	// non-const member function
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(T::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), lua_State* L, bool const_object, const Policies* policies)
	{
		if (const_object/* || lua_gettop(L) != BOOST_PP_ITERATION() + 1*/) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		return match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
	}

	// const member function
	template<class T, class Policies, class R BOOST_PP_COMMA_IF(BOOST_PP_ITERATION()) BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A)>
	int match(R(T::*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)) const, lua_State* L, bool const_object, const Policies* policies)
	{
		//if (lua_gettop(L) != BOOST_PP_ITERATION() + 1) return -1;
		typedef constructor<BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)> ParameterTypes;
		int m = match_params(L, 2, static_cast<ParameterTypes*>(0), policies);
		return const_object ? m : m + 1;
	}
	
#elif BOOST_PP_ITERATION_FLAGS() == 2

	template<>
	struct match_constructor<BOOST_PP_ITERATION()>
	{
		template<BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, class A), class Policies>
		static int apply(lua_State* L, int start_index, const constructor<BOOST_PP_ENUM_PARAMS(LUABIND_MAX_ARITY, A)>*, const Policies*)
		{
			int m = 0;
			BOOST_PP_REPEAT(BOOST_PP_ITERATION(), LUABIND_MATCH_DECL, _)
			return m;
		}
	};

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清不卡一区二区三区| 国产欧美一区二区三区在线老狼| 精品无码三级在线观看视频| 亚洲主播在线观看| 亚洲精品亚洲人成人网| 国产精品乱人伦一区二区| 日本一区二区视频在线观看| 久久久久久久久久久99999| 久久久99精品久久| 日本一二三不卡| 亚洲精品国产一区二区精华液| 亚洲欧洲国产日韩| 毛片av一区二区| 精品久久久久久久久久久院品网 | 亚洲h精品动漫在线观看| 一区二区三区在线影院| 天天综合网 天天综合色| 黑人巨大精品欧美一区| 国产一区二区三区免费| 在线欧美小视频| 日韩欧美亚洲另类制服综合在线| 久久在线观看免费| 亚洲狠狠爱一区二区三区| 日本一不卡视频| 91玉足脚交白嫩脚丫在线播放| 欧美肥大bbwbbw高潮| 日韩一区在线播放| 极品少妇xxxx精品少妇偷拍| 国产剧情在线观看一区二区| 91蝌蚪国产九色| 国产亚洲欧美日韩日本| 日本少妇一区二区| 欧美亚洲动漫制服丝袜| 国产日产精品一区| 麻豆91在线看| 在线不卡欧美精品一区二区三区| 中文字幕乱码一区二区免费| 日韩av高清在线观看| 91麻豆福利精品推荐| 国产精品久久久久久久久久久免费看 | 91精品国产色综合久久ai换脸| 中文字幕日本乱码精品影院| 国产宾馆实践打屁股91| 日韩欧美国产精品| 国产一区二区三区视频在线播放| 91麻豆精品国产| 日韩va亚洲va欧美va久久| 欧美老年两性高潮| 丝瓜av网站精品一区二区 | 综合欧美一区二区三区| 99精品国产91久久久久久| 国产精品成人一区二区艾草| 久久国产精品区| 久久久久久久久伊人| 91小视频在线观看| 亚洲一区二区精品久久av| 日韩欧美中文一区二区| 成人性生交大片免费看视频在线| 久久久久久毛片| 色激情天天射综合网| 日产精品久久久久久久性色| 26uuu亚洲婷婷狠狠天堂| 老司机午夜精品| 久久影院电视剧免费观看| 国产成人免费视频一区| 成人免费小视频| 久久精品夜夜夜夜久久| 麻豆国产精品官网| 亚洲日本一区二区| 欧美精品黑人性xxxx| 精品一区二区三区视频在线观看| 欧美一区二区免费| 不卡的av网站| 午夜精品久久久久久久99樱桃| 91精品国产乱码| 国产成人精品午夜视频免费| 亚洲美女屁股眼交| 日韩一区二区三区免费看| 色综合一区二区| 日韩高清不卡一区二区| 国产精品乱码久久久久久| 一本色道a无线码一区v| 裸体健美xxxx欧美裸体表演| 国产精品久久久久桃色tv| 欧美精品18+| 欧洲视频一区二区| 成人三级伦理片| 老色鬼精品视频在线观看播放| 综合婷婷亚洲小说| 国产精品久久久久桃色tv| 日韩一区二区三区av| 在线视频国内自拍亚洲视频| 九一九一国产精品| 日韩和欧美一区二区| 亚洲精品国产精品乱码不99| 国产精品萝li| 亚洲国产成人一区二区三区| 精品美女在线播放| 精品入口麻豆88视频| 91丨九色丨蝌蚪富婆spa| 99久久国产综合精品色伊| 国产91清纯白嫩初高中在线观看| 狠狠色狠狠色综合| 国产精品一区二区免费不卡| 日韩精品一区二| 亚洲国产成人精品视频| 精品免费一区二区三区| 日韩免费观看高清完整版| 7777精品伊人久久久大香线蕉| 欧美顶级少妇做爰| 久久久久亚洲综合| 国产欧美日韩综合| 亚洲欧美日韩综合aⅴ视频| 亚洲黄色免费网站| 久久精品国产在热久久| 成人午夜免费电影| 777午夜精品免费视频| 欧美一级二级三级乱码| 久久久国际精品| 有码一区二区三区| 午夜精品福利一区二区三区蜜桃| 免费高清成人在线| 国产曰批免费观看久久久| 99久久伊人精品| 欧美一区二区美女| 亚洲精品自拍动漫在线| 亚洲国产欧美在线| 国产91综合网| 在线成人高清不卡| 国产精品久久久久久久久图文区| 亚洲一区二区视频| 粉嫩久久99精品久久久久久夜| 欧美天堂一区二区三区| 国产精品乱人伦中文| 激情五月婷婷综合网| 欧美图片一区二区三区| 欧美韩国日本不卡| 麻豆精品一二三| 日韩欧美电影一二三| 亚洲福利视频一区二区| 欧美性感一区二区三区| 国产精品国产三级国产a | 最近日韩中文字幕| 国产69精品久久久久777| 精品理论电影在线| 久88久久88久久久| 欧美视频一区二区三区在线观看| 久久久精品中文字幕麻豆发布| 美腿丝袜亚洲色图| 91精品在线免费| 麻豆精品在线看| 久久视频一区二区| 风流少妇一区二区| 久久精品视频免费观看| 成人一区二区三区中文字幕| 久久亚洲综合av| 成人aaaa免费全部观看| 亚洲精品国产精品乱码不99| 国产suv精品一区二区6| 亚洲女人的天堂| 欧美日韩亚州综合| 奇米四色…亚洲| 中文天堂在线一区| 欧美性猛交xxxx黑人交| 青青草精品视频| 亚洲欧美日韩国产中文在线| 欧美色图天堂网| 18成人在线视频| 91精品国产一区二区| 99久久免费精品高清特色大片| 欧美精品一区二| 欧美一区二区观看视频| youjizz久久| 精品一区二区av| 亚洲已满18点击进入久久| 精品久久99ma| 91国产福利在线| 国产一区欧美二区| 舔着乳尖日韩一区| 亚洲五月六月丁香激情| 欧美精品一区二区三区在线播放| 欧美亚洲动漫制服丝袜| 99国产精品一区| 五月天中文字幕一区二区| 亚洲蜜臀av乱码久久精品| 中文字幕乱码久久午夜不卡| 91精品午夜视频| 欧美日韩一区视频| 97久久超碰精品国产| 国产乱淫av一区二区三区| 麻豆视频一区二区| 秋霞电影网一区二区| 日韩国产一区二| 日本大胆欧美人术艺术动态| 亚洲一二三四在线| 亚洲综合色自拍一区| 亚洲成精国产精品女| 午夜精品久久久久影视| 夜夜精品视频一区二区| 亚洲bdsm女犯bdsm网站|