在C++中,我们经常遇到在某个特定的时刻,需要将函数进行包装调用,尤其是当我们需要将不同签名的函数放到同一个集合时,由于函数签名不一致导致我们不能直接将各式各样的函数指针放到诸如list这样的集合中,因此对函数进行包装就显得格外重要.现在来介绍一下我写的一个函数包装器.

还是需要用到模板技巧,写这种类库没有模板将是不可能实现的任务,大家顺便学习一下模板编写也挺好的.

还是不废话,先上实例,后贴完整类库,这个类库需要用到前面写的萃取和序列化库,当然了,序列化库是可以被替换的,只要满足接口一致.

这里多废话一句:本人致力于写跨平台的C++开源代码,我之前以及现在以及将来上传的所有代码均以hpp文件发布,这种文件的好处就是可以直接包含到源码里使用,而不需要产生各种烦人的dll或者lib.这个库附带了一个scope_guard文件,也是一个很好的安全调用设计,有兴趣的看看

用例代码(看注释基本就可以了):

#include<iostream>
#include "../../traits/traits.hpp"
#include "../../serialization/archive.hpp"
#include "../../call_helper/call.hpp" using namespace std; int show(char i, int j)
{
return ;
} struct Stu
{
int show(char i, int j)
{
return ;
}
}; int main()
{
// C函数包装
callhelper::call_helper<int(char, int)> helper1(show);
helper1.call('a', ); // 类成员函数包装
Stu stu;
callhelper::call_helper<int(Stu::*)(char, int), Stu> helper2(&stu,&Stu::show);
helper2.call('a', ); // 另一种形式的C函数包装
callhelper::icall* helper3 = new callhelper::ccall<int(char, int)>(show);
//helper3->call(serialization::default_string_iarchive(str)); // 另一种形式的类成员函数包装
callhelper::icall* helper4 = new callhelper::ccall<int(Stu::*)(char, int), Stu>(&stu, &Stu::show);
//helper4->call(serialization::default_string_iarchive(str)); // 放到同一集合中
std::list<callhelper::icall*> _list;
_list.push_back(helper3);
_list.push_back(helper4); std::string str;
serialization::default_string_oarchive oarc(str);
oarc & 'a' & ; // 调用
for (std::list<callhelper::icall*>::iterator iter = _list.begin(); iter != _list.end(); ++iter)
{
(*iter)->call(serialization::default_string_iarchive(str));
} delete helper3;
delete helper4; return ;
}

完整的类库截图

// call.hpp

#ifndef CALL_INCLUDE
#define CALL_INCLUDE #include "call_helper.hpp"
#include "param_get_set.hpp"
#include "marshal.hpp"
#include "scope_guard.hpp"
#include "call_wrapper.hpp"
#include "call_container.hpp" #endif
// call_container.hpp

#ifndef CALL_CONTAINER_INCLUDE
#define CALL_CONTAINER_INCLUDE #include "call_helper_config.hpp"
#include "call_helper.hpp" #include <list>
#include <vector>
#include <set> NAMESPACE_CALL_HELPER_BEGIN struct basic_call_container
{
virtual void call(IArchive& iarc)=;
virtual ~basic_call_container(){}
}; //////////////////////////////////////////////////////////// template<typename containertype,typename classtype,typename funtype,int paramc>
struct _call_container : public basic_call_container{}; /////////////////////////////////////////////////////////// template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call();
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg19 arg19;
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename classtype,typename funtype>
struct _call_container<containertype,classtype,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg20 arg20;
typedef typename traits::mfunction_traits<funtype>::arg19 arg19;
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg20> get20(iarc);
param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,classtype>& c_helper = (call_helper<funtype,classtype>&)(*iter);
c_helper.call(get20,get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; ////////////////////////////////////////////////////////////// template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call();
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg19 arg19;
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; template<typename containertype,typename funtype>
struct _call_container<containertype,void,funtype,> : public basic_call_container
{
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg20 arg20;
typedef typename traits::function_traits<funtype>::arg19 arg19;
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg20> get20(iarc);
param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); for (typename containertype::iterator iter=_container.begin();
iter!=_container.end(); ++iter)
{
call_helper<funtype,void>& c_helper = (call_helper<funtype,void>&)(*iter);
c_helper.call(get20,get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}
containertype _container;
}; ////////////////////////////////////////////////////////////// template<typename _containertype,typename funtype,typename classtype=void>
struct call_container : public _call_container<_containertype,classtype,funtype,traits::mfunction_traits<funtype>::arity>
{
typedef _containertype containertype;
}; template<typename _containertype,typename funtype>
struct call_container<_containertype,funtype,void> : public _call_container<_containertype,void,funtype,traits::function_traits<funtype>::arity>
{
typedef _containertype containertype;
}; #define call_list(funtype,classtype) callhelper::call_container<std::list<callhelper::call_helper<funtype,classtype>>,funtype,classtype> #define call_set(funtype,classtype) callhelper::call_container<std::set<callhelper::call_helper<funtype,classtype>>,funtype,classtype> #define call_vector(funtype,classtype) callhelper::call_container<std::vector<callhelper::call_helper<funtype,classtype>>,funtype,classtype> NAMESPACE_CALL_HELPER_END
#endif
// call_helper.hpp
#ifndef CALL_HELPER_INCLUDE
#define CALL_HELPER_INCLUDE #include "call_helper_config.hpp"
#include "traits/traits.hpp"
#include "param_get_set.hpp" NAMESPACE_CALL_HELPER_BEGIN template<typename _result_type>
struct _call_result: public value_storage<_result_type>
{
static bool has_value(){ return true; }
enum{Has_Value=true};
}; template<>
struct _call_result<void>
{
static bool has_value(){ return false; }
int get_value()const{return -;}
operator int()const{return -;}
enum{Has_Value=false};
}; // 存储对象及方法指针
template<typename _class_type,typename _funtype>
struct _call_helper_obj : public _call_result<typename traits::mfunction_traits<_funtype>::result_type>
{
_class_type* _obj;
_funtype _fun;
_call_helper_obj(_class_type* obj,_funtype fun):_obj(obj),_fun(fun){} unsigned int funAddr()const{ return traits::pointer_integer_traits<unsigned int>(_fun);}
void funAddr(unsigned int addr){ _fun = traits::pointer_integer_traits<typename traits::mfunction_traits<_funtype>::MFunctionP_Type>(addr);}
unsigned int objAddr()const{ return reinterpret_cast<unsigned int>(_obj);}
void objAddr(unsigned int addr){ _obj = (_class_type*)(addr);}
bool operator ==(const _call_helper_obj<_class_type,_funtype>& c)const { return (funAddr()==c.funAddr() && objAddr()==c.objAddr());}
bool operator !=(const _call_helper_obj<_class_type,_funtype>& c)const { return !(c==*this);}
bool operator < (const _call_helper_obj<_class_type,_funtype>& c)const {
// 先比较函数地址,然后才是对象地址
if (funAddr() < c.funAddr())
return true;
else if (funAddr() > c.funAddr())
return false;
else
{
return (objAddr() < c.objAddr());
}
}
}; template<typename _funtype>
struct _call_helper_obj_p : public _call_result<typename traits::function_traits<_funtype>::result_type>
{
_funtype _fun;
_call_helper_obj_p(_funtype fun):_fun(fun){} unsigned int funAddr()const{ return traits::pointer_integer_traits<unsigned int>(_fun); }
void funAddr(unsigned int addr){ _fun = traits::pointer_integer_traits<typename traits::function_traits<_funtype>::FunctionP_Type>(addr);}
unsigned int objAddr()const{ return ;}
void objAddr(unsigned int addr){}
bool operator ==(const _call_helper_obj_p<_funtype>& c)const { return (funAddr()==c.funAddr() && objAddr()==c.objAddr()); }
bool operator !=(const _call_helper_obj_p<_funtype>& c)const { return !(c==*this);}
bool operator < (const _call_helper_obj_p<_funtype>& c)const {
// 先比较函数地址,然后才是对象地址
if (funAddr() < c.funAddr())
return true;
else if (funAddr() > c.funAddr())
return false;
else
{
return (objAddr() < c.objAddr());
}
}
}; ////////////////////////////////////////////////////////////////////////////////////////////////
// 成员方法调用
template<typename _funtype,typename _class_type> struct _invoke; template<typename _class_type,typename R>
struct _invoke<R(_class_type::*)(),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)()>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)()> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)()):_MyBase(obj,fun){} R call()
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)());
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1
>
struct _invoke<R(_class_type::*)(P1),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)(P1)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1)):_MyBase(obj,fun){} R call(P1 p1)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2
>
struct _invoke<R(_class_type::*)(P1,P2),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2)):_MyBase(obj,fun){} R call(P1 p1,P2 p2)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3
>
struct _invoke<R(_class_type::*)(P1,P2,P3),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5),_class_type> : public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16)
{
_MyBase::set_value((_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16));
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17)
{
_MyBase::set_value( (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) );
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18)
{
_MyBase::set_value( (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18) );
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19)
{
_MyBase::set_value( (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19) );
return _MyBase::get_value();
}
}; template
<
typename _class_type,typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19,
typename P20
>
struct _invoke<R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20),_class_type>
: public _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
{
typedef _call_helper_obj<_class_type,R(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)> _MyBase; _invoke(_class_type* obj,R(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)):_MyBase(obj,fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19,P20 p20)
{
_MyBase::set_value( (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20) );
return _MyBase::get_value();
}
}; /// template<typename _funtype> struct _invoke_p; template<typename R>
struct _invoke_p<R(*)()> : public _call_helper_obj_p<R(*)()>
{
typedef _call_helper_obj_p<R(*)()> _MyBase; _invoke_p(R(*fun)()):_MyBase(fun){} R call()
{
_MyBase::set_value((R)(_MyBase::_fun)());
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1
>
struct _invoke_p<R(*)(P1)> : public _call_helper_obj_p<R(*)(P1)>
{
typedef _call_helper_obj_p<R(*)(P1)> _MyBase; _invoke_p(R(*fun)(P1)):_MyBase(fun){} R call(P1 p1)
{
_MyBase::set_value( (_MyBase::_fun)(p1) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2
>
struct _invoke_p<R(*)(P1,P2)> : public _call_helper_obj_p<R(*)(P1,P2)>
{
typedef _call_helper_obj_p<R(*)(P1,P2)> _MyBase; _invoke_p(R(*fun)(P1,P2)):_MyBase(fun){} R call(P1 p1,P2 p2)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3
>
struct _invoke_p<R(*)(P1,P2,P3)> : public _call_helper_obj_p<R(*)(P1,P2,P3)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4
>
struct _invoke_p<R(*)(P1,P2,P3,P4)> : public _call_helper_obj_p<R(*)(P1,P2,P3,P4)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5)> : public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19) );
return _MyBase::get_value();
}
}; template
<
typename R,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19,
typename P20
>
struct _invoke_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
: public _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
{
typedef _call_helper_obj_p<R(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)> _MyBase; _invoke_p(R(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)):_MyBase(fun){} R call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19,P20 p20)
{
_MyBase::set_value( (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20) );
return _MyBase::get_value();
}
}; /////// template<>
struct _invoke_p<void(*)()> : public _call_helper_obj_p<void(*)()>
{
typedef _call_helper_obj_p<void(*)()> _MyBase; _invoke_p(void(*fun)()):_MyBase(fun){} void call()
{
return (_MyBase::_fun)();
}
}; template
<
typename P1
>
struct _invoke_p<void(*)(P1)> : public _call_helper_obj_p<void(*)(P1)>
{
typedef _call_helper_obj_p<void(*)(P1)> _MyBase; _invoke_p(void(*fun)(P1)):_MyBase(fun){} void call(P1 p1)
{
return (_MyBase::_fun)(p1);
}
}; template
<
typename P1,
typename P2
>
struct _invoke_p<void(*)(P1,P2)> : public _call_helper_obj_p<void(*)(P1,P2)>
{
typedef _call_helper_obj_p<void(*)(P1,P2)> _MyBase; _invoke_p(void(*fun)(P1,P2)):_MyBase(fun){} void call(P1 p1,P2 p2)
{
return (_MyBase::_fun)(p1,p2);
}
}; template
<
typename P1,
typename P2,
typename P3
>
struct _invoke_p<void(*)(P1,P2,P3)> : public _call_helper_obj_p<void(*)(P1,P2,P3)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3)
{
return (_MyBase::_fun)(p1,p2,p3);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4
>
struct _invoke_p<void(*)(P1,P2,P3,P4)> : public _call_helper_obj_p<void(*)(P1,P2,P3,P4)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4)
{
return (_MyBase::_fun)(p1,p2,p3,p4);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5)> : public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19);
}
}; template
<
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19,
typename P20
>
struct _invoke_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
: public _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
{
typedef _call_helper_obj_p<void(*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)> _MyBase; _invoke_p(void(*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)):_MyBase(fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19,P20 p20)
{
return (_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20);
}
}; ///// template<typename _class_type>
struct _invoke<void(_class_type::*)(),_class_type> : public _call_helper_obj<_class_type,void(_class_type::*)()>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)()> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)()):_MyBase(obj,fun){} void call()
{
return (_MyBase::_obj->*_MyBase::_fun)();
}
}; template
<
typename _class_type,
typename P1
>
struct _invoke<void(_class_type::*)(P1),_class_type> : public _call_helper_obj<_class_type,void(_class_type::*)(P1)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1)):_MyBase(obj,fun){} void call(P1 p1)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1);
}
}; template
<
typename _class_type,
typename P1,
typename P2
>
struct _invoke<void(_class_type::*)(P1,P2),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2)):_MyBase(obj,fun){} void call(P1 p1,P2 p2)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3
>
struct _invoke<void(_class_type::*)(P1,P2,P3),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19);
}
}; template
<
typename _class_type,
typename P1,
typename P2,
typename P3,
typename P4,
typename P5,
typename P6,
typename P7,
typename P8,
typename P9,
typename P10,
typename P11,
typename P12,
typename P13,
typename P14,
typename P15,
typename P16,
typename P17,
typename P18,
typename P19,
typename P20
>
struct _invoke<void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20),_class_type>
: public _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)>
{
typedef _call_helper_obj<_class_type,void(_class_type::*)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)> _MyBase; _invoke(_class_type* obj,void(_class_type::*fun)(P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20)):_MyBase(obj,fun){} void call(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12,P13 p13,P14 p14,P15 p15,P16 p16,P17 p17,P18 p18,P19 p19,P20 p20)
{
return (_MyBase::_obj->*_MyBase::_fun)(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20);
}
}; ////////////////////////////////////////////////////////////////////////////////////////////////
// 方法调用包装 // class
template<typename _funtype,typename _class_type=void>
struct call_helper : public _invoke<typename traits::mfunction_traits<_funtype>::MFunctionP_Type,_class_type>
{
typedef _invoke<typename traits::mfunction_traits<_funtype>::MFunctionP_Type,_class_type> _MyBase; call_helper(
_class_type* obj,
typename traits::mfunction_traits<_funtype>::MFunctionP_Type fun
)
:_MyBase(obj,fun){} virtual ~call_helper(){}
}; // func
template<typename _funtype>
struct call_helper<_funtype,void> : public _invoke_p<typename traits::function_traits<_funtype>::FunctionP_Type>
{
typedef _invoke_p<typename traits::function_traits<_funtype>::FunctionP_Type> _MyBase; call_helper(typename traits::function_traits<_funtype>::FunctionP_Type fun)
: _MyBase(fun){} virtual ~call_helper(){}
}; NAMESPACE_CALL_HELPER_END
#endif
//call_helper_config.hpp
#ifndef CALL_HELPER_CONFIG_INCLUDE
#define CALL_HELPER_CONFIG_INCLUDE #define NAMESPACE_CALL_HELPER_BEGIN namespace callhelper{
#define NAMESPACE_CALL_HELPER_END } #include "serialization/archive.hpp" NAMESPACE_CALL_HELPER_BEGIN typedef serialization::default_string_iarchive IArchive;
typedef serialization::default_string_oarchive OArchive; NAMESPACE_CALL_HELPER_END
#endif
//call_wrapper.hpp
#ifndef CALL_WRAPPER_INCLUDE
#define CALL_WRAPPER_INCLUDE #include "call_helper_config.hpp"
#include "param_get_set.hpp"
#include "call_helper.hpp" NAMESPACE_CALL_HELPER_BEGIN struct icall
{
virtual void call(IArchive& iarc)=;
virtual unsigned int funAddr()const=;
virtual void funAddr(unsigned int addr)=;
virtual unsigned int objAddr()const=;
virtual void objAddr(unsigned int addr)=;
virtual bool equal(const icall* c){ return (funAddr()==c->funAddr() && objAddr()==c->objAddr());}
virtual bool result()const=;
virtual void result(std::string& out)const=;
virtual ~icall(){}
}; template<typename funtype>
struct _calladdr : public icall
{
call_helper<funtype> _call_helper;
enum{Has_Value=call_helper<funtype>::Has_Value}; _calladdr(funtype fun)
:_call_helper(fun){} virtual unsigned int funAddr()const{ return _call_helper.funAddr();}
virtual void funAddr(unsigned int addr){ _call_helper.funAddr(addr);} virtual unsigned int objAddr()const{ return _call_helper.objAddr();}
virtual void objAddr(unsigned int addr){_call_helper.objAddr(addr);} virtual bool result()const{ return _call_helper.has_value();}
virtual void result(std::string& out)const
{
OArchive oarc(out);
oarc << _call_helper.get_value();
}
}; template<typename classtype,typename funtype>
struct _calladdr2 : public icall
{
call_helper<funtype,classtype> _call_helper;
enum{Has_Value=call_helper<funtype,classtype>::Has_Value}; _calladdr2(classtype* obj,funtype fun)
:_call_helper(obj,fun){} virtual unsigned int funAddr()const{ return _call_helper.funAddr();}
virtual void funAddr(unsigned int addr){ _call_helper.funAddr(addr);} virtual unsigned int objAddr()const{ return _call_helper.objAddr();}
virtual void objAddr(unsigned int addr){ _call_helper.objAddr(addr);} virtual bool result()const{ return _call_helper.has_value();}
virtual void result(std::string& out)const
{
OArchive oarc(out);
oarc << _call_helper.get_value();
}
}; ////////////////// 继承 template<typename funtype,int num>
struct _ccall : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc){}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
_calladdr<funtype>::_call_helper.call();
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg19 arg19;
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename funtype>
struct _ccall<funtype,> : public _calladdr<funtype>
{
_ccall(funtype fun):_calladdr<funtype>(fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::function_traits<funtype>::arg20 arg20;
typedef typename traits::function_traits<funtype>::arg19 arg19;
typedef typename traits::function_traits<funtype>::arg18 arg18;
typedef typename traits::function_traits<funtype>::arg17 arg17;
typedef typename traits::function_traits<funtype>::arg16 arg16;
typedef typename traits::function_traits<funtype>::arg15 arg15;
typedef typename traits::function_traits<funtype>::arg14 arg14;
typedef typename traits::function_traits<funtype>::arg13 arg13;
typedef typename traits::function_traits<funtype>::arg12 arg12;
typedef typename traits::function_traits<funtype>::arg11 arg11;
typedef typename traits::function_traits<funtype>::arg10 arg10;
typedef typename traits::function_traits<funtype>::arg9 arg9;
typedef typename traits::function_traits<funtype>::arg8 arg8;
typedef typename traits::function_traits<funtype>::arg7 arg7;
typedef typename traits::function_traits<funtype>::arg6 arg6;
typedef typename traits::function_traits<funtype>::arg5 arg5;
typedef typename traits::function_traits<funtype>::arg4 arg4;
typedef typename traits::function_traits<funtype>::arg3 arg3;
typedef typename traits::function_traits<funtype>::arg2 arg2;
typedef typename traits::function_traits<funtype>::arg1 arg1; param_get<arg20> get20(iarc);
param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr<funtype>::_call_helper.call(get20,get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; //////////////////////// template<typename classtype,typename funtype,int num>
struct _ccall2 : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc){}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
_calladdr2<classtype,funtype>::_call_helper.call();
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg19 arg19;
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; template<typename classtype,typename funtype>
struct _ccall2<classtype,funtype,> : public _calladdr2<classtype,funtype>
{
_ccall2(classtype* obj,funtype fun):_calladdr2<classtype,funtype>(obj,fun){}
virtual void call(IArchive& iarc)
{
typedef typename traits::mfunction_traits<funtype>::arg20 arg20;
typedef typename traits::mfunction_traits<funtype>::arg19 arg19;
typedef typename traits::mfunction_traits<funtype>::arg18 arg18;
typedef typename traits::mfunction_traits<funtype>::arg17 arg17;
typedef typename traits::mfunction_traits<funtype>::arg16 arg16;
typedef typename traits::mfunction_traits<funtype>::arg15 arg15;
typedef typename traits::mfunction_traits<funtype>::arg14 arg14;
typedef typename traits::mfunction_traits<funtype>::arg13 arg13;
typedef typename traits::mfunction_traits<funtype>::arg12 arg12;
typedef typename traits::mfunction_traits<funtype>::arg11 arg11;
typedef typename traits::mfunction_traits<funtype>::arg10 arg10;
typedef typename traits::mfunction_traits<funtype>::arg9 arg9;
typedef typename traits::mfunction_traits<funtype>::arg8 arg8;
typedef typename traits::mfunction_traits<funtype>::arg7 arg7;
typedef typename traits::mfunction_traits<funtype>::arg6 arg6;
typedef typename traits::mfunction_traits<funtype>::arg5 arg5;
typedef typename traits::mfunction_traits<funtype>::arg4 arg4;
typedef typename traits::mfunction_traits<funtype>::arg3 arg3;
typedef typename traits::mfunction_traits<funtype>::arg2 arg2;
typedef typename traits::mfunction_traits<funtype>::arg1 arg1; param_get<arg20> get20(iarc);
param_get<arg19> get19(iarc);
param_get<arg18> get18(iarc);
param_get<arg17> get17(iarc);
param_get<arg16> get16(iarc);
param_get<arg15> get15(iarc);
param_get<arg14> get14(iarc);
param_get<arg13> get13(iarc);
param_get<arg12> get12(iarc);
param_get<arg11> get11(iarc);
param_get<arg10> get10(iarc);
param_get<arg9> get9(iarc);
param_get<arg8> get8(iarc);
param_get<arg7> get7(iarc);
param_get<arg6> get6(iarc);
param_get<arg5> get5(iarc);
param_get<arg4> get4(iarc);
param_get<arg3> get3(iarc);
param_get<arg2> get2(iarc);
param_get<arg1> get1(iarc); _calladdr2<classtype,funtype>::_call_helper.call(get20,get19,get18,get17,get16,get15,get14,get13,get12,get11,get10,get9,get8,get7,get6,get5,get4,get3,get2,get1);
}
}; ///////////////////////////////// 包装 template<typename funtype,typename classtype=void>
struct ccall : public _ccall2<classtype,funtype,traits::mfunction_traits<funtype>::arity>
{
typedef _ccall2<classtype,funtype,traits::mfunction_traits<funtype>::arity> _MyBase; ccall(classtype* obj,typename traits::mfunction_traits<funtype>::MFunctionP_Type fun)
:_MyBase(obj,fun){}
}; template<typename funtype>
struct ccall<funtype,void>
: public _ccall<typename traits::function_traits<funtype>::FunctionP_Type,traits::function_traits<funtype>::arity>
{
typedef _ccall<typename traits::function_traits<funtype>::FunctionP_Type,traits::function_traits<funtype>::arity> _MyBase; ccall(typename traits::function_traits<funtype>::FunctionP_Type fun)
:_MyBase(fun){}
}; NAMESPACE_CALL_HELPER_END
#endif
//marshal.hpp
#ifndef MARSHAL_INCLUDE
#define MARSHAL_INCLUDE #include "call_helper_config.hpp" NAMESPACE_CALL_HELPER_BEGIN // 近程序列化输出 template<typename T,typename Arch>
struct OutParameter
{
OutParameter(const T& t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameter<const T,Arch>
{
OutParameter(const T& t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameter<T&,Arch>
{
OutParameter(T& t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(&t);
arch << addr;
}
}; template<typename T,typename Arch>
struct OutParameter<const T&,Arch>
{
OutParameter(const T& t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(&t);
arch << addr;
}
}; template<typename T,typename Arch>
struct OutParameter<T*,Arch>
{
OutParameter(const T* t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameter<const T*,Arch>
{
OutParameter(const T* t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameter<T**,Arch>
{
OutParameter(T** t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(t);
arch << addr;
}
}; template<typename T,typename Arch>
struct OutParameter<const T**,Arch>
{
OutParameter(const T** t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(t);
arch << addr;
}
}; template<typename T,typename Arch>
struct OutParameter<T*&,Arch>
{
OutParameter(T*& t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(&t);
arch << addr;
}
}; template<typename T,typename Arch>
struct OutParameter<const T*&,Arch>
{
OutParameter(const T*& t,Arch& arch)
{
unsigned int addr = traits::pointer_integer_traits<unsigned int>(&t);
arch << addr;
}
}; // 近程序列化输入 template<typename T,typename Arch>
struct InParameter
{
typename traits::type_traits<T>::value_type _t;
InParameter(Arch& arch)
{
arch >> _t;
}
operator T&(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<const T,Arch>
{
typename traits::type_traits<T>::value_type _t;
InParameter(Arch& arch)
{
arch >> _t;
}
operator const T&(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<T&,Arch>
{
typename traits::type_traits<T>::pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_type>(addr);
}
operator T&(){ return *_t;}
}; template<typename T,typename Arch>
struct InParameter<const T&,Arch>
{
typename traits::type_traits<T>::pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_type>(addr);
}
operator const T&(){ return *_t;}
}; template<typename T,typename Arch>
struct InParameter<T*,Arch>
{
typename traits::type_traits<T>::pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_type>(addr);
}
operator T*(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<const T*,Arch>
{
typename traits::type_traits<T>::pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_type>(addr);
}
operator const T*(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<T**,Arch>
{
typename traits::type_traits<T>::pointer_pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_pointer_type>(addr);
}
operator T**(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<const T**,Arch>
{
typename traits::type_traits<T>::pointer_pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_pointer_type>(addr);
}
operator const T**(){ return _t;}
}; template<typename T,typename Arch>
struct InParameter<T*&,Arch>
{
typename traits::type_traits<T>::pointer_pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_pointer_type>(addr);
}
operator T*&(){ return *_t;}
}; template<typename T,typename Arch>
struct InParameter<const T*&,Arch>
{
typename traits::type_traits<T>::pointer_pointer_type _t;
InParameter(Arch& arch)
{
unsigned int addr =;
arch >> addr;
_t = traits::pointer_integer_traits<typename traits::type_traits<T>::pointer_pointer_type>(addr);
}
operator const T*&(){ return *_t;}
}; // 远程序列化输出,只支持值类型,引用类型,const值类型,const 引用类型 template<typename T,typename Arch>
struct OutParameterR
{
OutParameterR(const T& t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameterR<const T,Arch>
{
OutParameterR(T& t,Arch& arch)
{
arch << t;
}
}; template<typename T,typename Arch>
struct OutParameterR<T&,Arch>
{
OutParameterR(const T& t,Arch& arch)
{
arch << t;
}
}; // 远程序列化输入
template<typename T,typename Arch>
struct InParameterR
{
typename traits::type_traits<T>::value_type _t;
InParameterR(Arch& arch)
{
arch >> _t;
}
operator T&(){ return _t;}
}; template<typename T,typename Arch>
struct InParameterR<const T,Arch>
{
typename traits::type_traits<T>::value_type _t;
InParameterR(Arch& arch)
{
arch >> _t;
}
operator const T&(){ return _t;}
}; template<typename T,typename Arch>
struct InParameterR<T&,Arch>
{
typename traits::type_traits<T>::value_type _t;
InParameterR(Arch& arch)
{
arch >> _t;
}
operator T&(){ return _t;}
}; template<typename T,typename Arch>
struct InParameterR<const T&,Arch>
{
typename traits::type_traits<T>::value_type _t;
InParameterR(Arch& arch)
{
arch >> _t;
}
operator const T&(){ return _t;}
}; NAMESPACE_CALL_HELPER_END
#endif
//param_get_set.hpp
#ifndef PARAM_GET_SET_INCLUDE
#define PARAM_GET_SET_INCLUDE #include "call_helper_config.hpp"
#include "marshal.hpp"
#include "traits/traits.hpp" NAMESPACE_CALL_HELPER_BEGIN template<typename T,typename Arch=OArchive>
struct param_set : public OutParameter<T,Arch>
{
param_set(T t,Arch& arch):OutParameter(t,arch){}
}; template<typename T,typename Arch=IArchive>
struct param_get : public InParameter<T,Arch>
{
param_get(Arch& arch):InParameter(arch){}
}; // 值存储
template<typename T>
struct value_storage
{
typename traits::type_traits<T>::value_type _value;
value_storage(T v):_value(v){}
value_storage(){}
operator T()const{ return get_value(); }
void set_value(T v){ _value = v;}
T get_value()const{ return (_value); }
}; template<typename T>
struct value_storage<T&>
{
typename traits::type_traits<T>::pointer_type _value;
value_storage(T& v){ set_value(v);}
value_storage(){}
operator T&(){ return get_value(); }
void set_value(T& v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_type>(&v);
}
T& get_value()const{ return const_cast<T&>(*_value); }
}; template<typename T>
struct value_storage<T*>
{
typename traits::type_traits<T>::pointer_type _value;
value_storage(T* v){ set_value(v); }
value_storage(){}
operator T*()const{ return get_value(); }
void set_value(T* v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_type>(v);
}
T* get_value()const{ return const_cast<T*>(_value); }
}; template<typename T>
struct value_storage<T**>
{
typename traits::type_traits<T>::pointer_pointer_type _value;
value_storage(T** v){ set_value(v); }
value_storage(){}
operator T**()const{ return get_value(); }
void set_value(T** v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_pointer_type>(v);
}
T** get_value()const{ return (_value); }
}; template<typename T>
struct value_storage<const T**>
{
typename traits::type_traits<T>::pointer_pointer_type _value;
value_storage(const T** v){ set_value(v); }
value_storage(){}
operator const T**()const{ return get_value(); }
void set_value(const T** v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_pointer_type>(v);
}
const T** get_value()const{ return const_cast<const T**>(_value); }
}; template<typename T>
struct value_storage<T*&>
{
typename traits::type_traits<T>::pointer_pointer_type _value;
value_storage(T*& v){ set_value(v); }
value_storage(){}
operator T*&()const{ return get_value(); }
void set_value(T*& v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_pointer_type>(&v);
}
T*& get_value()const{ return (*_value); }
}; template<typename T>
struct value_storage<const T*&>
{
typename traits::type_traits<T>::pointer_pointer_type _value;
value_storage(const T*& v){ set_value(v); }
value_storage(){}
operator const T*&()const{ return get_value(); }
void set_value(const T*& v)
{
_value = const_cast<typename traits::type_traits<T>::pointer_pointer_type>(&v);
}
const T*& get_value()const{ return const_cast<const T*&>(*_value); }
}; NAMESPACE_CALL_HELPER_END
#endif
//scope_guard.hpp
#ifndef SCOPE_GUARD_INCLUDE
#define SCOPE_GUARD_INCLUDE #include "call_helper_config.hpp" NAMESPACE_CALL_HELPER_BEGIN class ScopeGuardImplBase
{
ScopeGuardImplBase& operator =(const ScopeGuardImplBase&);
protected:
~ScopeGuardImplBase()
{
}
ScopeGuardImplBase(const ScopeGuardImplBase& other) throw()
: dismissed_(other.dismissed_)
{
other.Dismiss();
}
template <typename J>
static void SafeExecute(J& j) throw()
{
if (!j.dismissed_)
try
{
j.Execute();
}
catch(...)
{
}
} mutable bool dismissed_;
public:
ScopeGuardImplBase() throw() : dismissed_(false)
{
}
void Dismiss() const throw()
{
dismissed_ = true;
}
}; typedef const ScopeGuardImplBase& ScopeGuard; //************************************************************************* template <typename F>
class ScopeGuardImpl0 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl0<F> MakeGuard(F fun)
{
return ScopeGuardImpl0<F>(fun);
}
~ScopeGuardImpl0() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_();
}
protected:
ScopeGuardImpl0(F fun) : fun_(fun)
{
}
F fun_;
}; template <typename F>
inline ScopeGuardImpl0<F> MakeGuard(F fun)
{
return ScopeGuardImpl0<F>::MakeGuard(fun);
} template <typename F, typename P1>
class ScopeGuardImpl1 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1)
{
return ScopeGuardImpl1<F, P1>(fun, p1);
}
~ScopeGuardImpl1() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_);
}
protected:
ScopeGuardImpl1(F fun, P1 p1) : fun_(fun), p1_(p1)
{
}
F fun_;
const P1 p1_;
}; template <typename F, typename P1>
inline ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1)
{
return ScopeGuardImpl1<F, P1>::MakeGuard(fun, p1);
} template <typename F, typename P1, typename P2>
class ScopeGuardImpl2: public ScopeGuardImplBase
{
public:
static ScopeGuardImpl2<F, P1, P2> MakeGuard(F fun, P1 p1, P2 p2)
{
return ScopeGuardImpl2<F, P1, P2>(fun, p1, p2);
}
~ScopeGuardImpl2() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_);
}
protected:
ScopeGuardImpl2(F fun, P1 p1, P2 p2) : fun_(fun), p1_(p1), p2_(p2)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
}; template <typename F, typename P1, typename P2>
inline ScopeGuardImpl2<F, P1, P2> MakeGuard(F fun, P1 p1, P2 p2)
{
return ScopeGuardImpl2<F, P1, P2>::MakeGuard(fun, p1, p2);
} template <typename F, typename P1, typename P2, typename P3>
class ScopeGuardImpl3 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl3<F, P1, P2, P3> MakeGuard(F fun, P1 p1, P2 p2, P3 p3)
{
return ScopeGuardImpl3<F, P1, P2, P3>(fun, p1, p2, p3);
}
~ScopeGuardImpl3() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_);
}
protected:
ScopeGuardImpl3(F fun, P1 p1, P2 p2, P3 p3) : fun_(fun), p1_(p1), p2_(p2), p3_(p3)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
}; template <typename F, typename P1, typename P2, typename P3>
inline ScopeGuardImpl3<F, P1, P2, P3> MakeGuard(F fun, P1 p1, P2 p2, P3 p3)
{
return ScopeGuardImpl3<F, P1, P2, P3>::MakeGuard(fun, p1, p2, p3);
} template <typename F, typename P1, typename P2, typename P3, typename P4>
class ScopeGuardImpl4 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl4<F, P1, P2, P3,P4> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4)
{
return ScopeGuardImpl4<F, P1, P2, P3,P4>(fun, p1, p2, p3,p4);
}
~ScopeGuardImpl4() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_);
}
protected:
ScopeGuardImpl4(F fun, P1 p1, P2 p2, P3 p3,P4 p4) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4>
inline ScopeGuardImpl4<F, P1, P2, P3,P4> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4)
{
return ScopeGuardImpl4<F, P1, P2, P3,P4>::MakeGuard(fun, p1, p2, p3,p4);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5>
class ScopeGuardImpl5 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl5<F, P1, P2, P3,P4,P5> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5)
{
return ScopeGuardImpl5<F, P1, P2, P3,P4,P5>(fun, p1, p2, p3,p4,p5);
}
~ScopeGuardImpl5() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_);
}
protected:
ScopeGuardImpl5(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5>
inline ScopeGuardImpl5<F, P1, P2, P3,P4,P5> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5)
{
return ScopeGuardImpl5<F, P1, P2, P3,P4,P5>::MakeGuard(fun, p1, p2, p3,p4,p5);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6>
class ScopeGuardImpl6 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl6<F, P1, P2, P3,P4,P5,P6> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6)
{
return ScopeGuardImpl6<F, P1, P2, P3,P4,P5,P6>(fun, p1, p2, p3,p4,p5,p6);
}
~ScopeGuardImpl6() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_);
}
protected:
ScopeGuardImpl6(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6>
inline ScopeGuardImpl6<F, P1, P2, P3,P4,P5,P6> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6)
{
return ScopeGuardImpl6<F, P1, P2, P3,P4,P5,P6>::MakeGuard(fun, p1, p2, p3,p4,p5,p6);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7>
class ScopeGuardImpl7 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl7<F, P1, P2, P3,P4,P5,P6,P7> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
return ScopeGuardImpl7<F, P1, P2, P3,P4,P5,P6,P7>(fun, p1, p2, p3,p4,p5,p6,p7);
}
~ScopeGuardImpl7() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_);
}
protected:
ScopeGuardImpl7(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7>
inline ScopeGuardImpl7<F, P1, P2, P3,P4,P5,P6,P7> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7)
{
return ScopeGuardImpl7<F, P1, P2, P3,P4,P5,P6,P7>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8>
class ScopeGuardImpl8 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl8<F, P1, P2, P3,P4,P5,P6,P7,P8> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
return ScopeGuardImpl8<F, P1, P2, P3,P4,P5,P6,P7,P8>(fun, p1, p2, p3,p4,p5,p6,p7,p8);
}
~ScopeGuardImpl8() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_,p8_);
}
protected:
ScopeGuardImpl8(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7),p8_(p8)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8>
inline ScopeGuardImpl8<F, P1, P2, P3,P4,P5,P6,P7,P8> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8)
{
return ScopeGuardImpl8<F, P1, P2, P3,P4,P5,P6,P7,P8>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7,p8);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9>
class ScopeGuardImpl9 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl9<F, P1, P2, P3,P4,P5,P6,P7,P8,P9> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
return ScopeGuardImpl9<F, P1, P2, P3,P4,P5,P6,P7,P8,P9>(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9);
}
~ScopeGuardImpl9() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_,p8_,p9_);
}
protected:
ScopeGuardImpl9(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7),p8_(p8),p9_(p9)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9>
inline ScopeGuardImpl9<F, P1, P2, P3,P4,P5,P6,P7,P8,P9> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9)
{
return ScopeGuardImpl9<F, P1, P2, P3,P4,P5,P6,P7,P8,P9>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10>
class ScopeGuardImpl10 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl10<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10)
{
return ScopeGuardImpl10<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10>(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10);
}
~ScopeGuardImpl10() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_);
}
protected:
ScopeGuardImpl10(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10) : fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7),p8_(p8),p9_(p9),p10_(p10)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10>
inline ScopeGuardImpl10<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10)
{
return ScopeGuardImpl10<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10,typename P11>
class ScopeGuardImpl11 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl11<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10,P11 p11)
{
return ScopeGuardImpl11<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11>(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10,p11);
}
~ScopeGuardImpl11() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_,p11_);
}
protected:
ScopeGuardImpl11(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
: fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7),p8_(p8),p9_(p9),p10_(p10),p11_(p11)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
const P11 p11_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10,typename P11>
inline ScopeGuardImpl11<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11)
{
return ScopeGuardImpl11<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10,p11);
} template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10,typename P11,typename P12>
class ScopeGuardImpl12 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl12<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11,P12> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10,P11 p11,P12 p12)
{
return ScopeGuardImpl12<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11,P12>(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
}
~ScopeGuardImpl12() throw()
{
SafeExecute(*this);
}
void Execute()
{
fun_(p1_, p2_, p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_,p11_,p12_);
}
protected:
ScopeGuardImpl12(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12)
: fun_(fun), p1_(p1), p2_(p2), p3_(p3), p4_(p4),p5_(p5),p6_(p6),p7_(p7),p8_(p8),p9_(p9),p10_(p10),p11_(p11),p12_(p12)
{
}
F fun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
const P11 p11_;
const P12 p12_;
}; template <typename F, typename P1, typename P2, typename P3, typename P4, typename P5,typename P6,
typename P7,typename P8, typename P9, typename P10,typename P11,typename P12>
inline ScopeGuardImpl12<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11,P12> MakeGuard(F fun, P1 p1, P2 p2, P3 p3,P4 p4,P5 p5,P6 p6,P7 p7,P8 p8,P9 p9,P10 p10,P11 p11,P12 p12)
{
return ScopeGuardImpl12<F, P1, P2, P3,P4,P5,P6,P7,P8,P9,P10,P11,P12>::MakeGuard(fun, p1, p2, p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
} //************************************************************ template <class Obj, typename MemFun>
class ObjScopeGuardImpl0 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl0<Obj, MemFun> MakeObjGuard(Obj& obj, MemFun memFun)
{
return ObjScopeGuardImpl0<Obj, MemFun>(obj, memFun);
}
~ObjScopeGuardImpl0() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)();
}
protected:
ObjScopeGuardImpl0(Obj& obj, MemFun memFun)
: obj_(obj), memFun_(memFun) {}
Obj& obj_;
MemFun memFun_;
}; template <class Obj, typename MemFun>
inline ObjScopeGuardImpl0<Obj, MemFun> MakeObjGuard(Obj& obj, MemFun memFun)
{
return ObjScopeGuardImpl0<Obj, MemFun>::MakeObjGuard(obj, memFun);
} template <class Obj, typename MemFun, typename P1>
class ObjScopeGuardImpl1 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl1<Obj, MemFun, P1> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1)
{
return ObjScopeGuardImpl1<Obj, MemFun, P1>(obj, memFun, p1);
}
~ObjScopeGuardImpl1() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_);
}
protected:
ObjScopeGuardImpl1(Obj& obj, MemFun memFun, P1 p1)
: obj_(obj), memFun_(memFun), p1_(p1) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
}; template <class Obj, typename MemFun, typename P1>
inline ObjScopeGuardImpl1<Obj, MemFun, P1> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1)
{
return ObjScopeGuardImpl1<Obj, MemFun, P1>::MakeObjGuard(obj, memFun, p1);
} template <class Obj, typename MemFun, typename P1, typename P2>
class ObjScopeGuardImpl2 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl2<Obj, MemFun, P1, P2> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2)
{
return ObjScopeGuardImpl2<Obj, MemFun, P1, P2>(obj, memFun, p1, p2);
}
~ObjScopeGuardImpl2() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_);
}
protected:
ObjScopeGuardImpl2(Obj& obj, MemFun memFun, P1 p1, P2 p2)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
}; template <class Obj, typename MemFun, typename P1, typename P2>
inline ObjScopeGuardImpl2<Obj, MemFun, P1, P2> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2)
{
return ObjScopeGuardImpl2<Obj, MemFun, P1, P2>::MakeObjGuard(obj, memFun, p1, p2);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3>
class ObjScopeGuardImpl3 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3)
{
return ObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3>(obj, memFun, p1, p2, p3);
}
~ObjScopeGuardImpl3() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_);
}
protected:
ObjScopeGuardImpl3(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3>
inline ObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3)
{
return ObjScopeGuardImpl3<Obj, MemFun, P1, P2, P3>::MakeObjGuard(obj, memFun, p1, p2, p3);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4>
class ObjScopeGuardImpl4 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl4<Obj, MemFun, P1, P2, P3, P4> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4)
{
return ObjScopeGuardImpl4<Obj, MemFun, P1, P2, P3, P4>(obj, memFun, p1, p2, p3, p4);
}
~ObjScopeGuardImpl4() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_);
}
protected:
ObjScopeGuardImpl4(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4>
inline ObjScopeGuardImpl4<Obj, MemFun, P1, P2, P3, P4> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4)
{
return ObjScopeGuardImpl4<Obj, MemFun, P1, P2, P3, P4>::MakeObjGuard(obj, memFun, p1, p2, p3, p4);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5>
class ObjScopeGuardImpl5 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl5<Obj, MemFun, P1, P2, P3, P4, P5> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
{
return ObjScopeGuardImpl5<Obj, MemFun, P1, P2, P3, P4, P5>(obj, memFun, p1, p2, p3, p4, p5);
}
~ObjScopeGuardImpl5() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_);
}
protected:
ObjScopeGuardImpl5(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5>
inline ObjScopeGuardImpl5<Obj, MemFun, P1, P2, P3, P4, P5> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
{
return ObjScopeGuardImpl5<Obj, MemFun, P1, P2, P3, P4, P5>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
class ObjScopeGuardImpl6 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl6<Obj, MemFun, P1, P2, P3, P4, P5, P6> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
{
return ObjScopeGuardImpl6<Obj, MemFun, P1, P2, P3, P4, P5, P6>(obj, memFun, p1, p2, p3, p4, p5, p6);
}
~ObjScopeGuardImpl6() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_);
}
protected:
ObjScopeGuardImpl6(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
inline ObjScopeGuardImpl6<Obj, MemFun, P1, P2, P3, P4, P5, P6> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
{
return ObjScopeGuardImpl6<Obj, MemFun, P1, P2, P3, P4, P5, P6>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7>
class ObjScopeGuardImpl7 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl7<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
{
return ObjScopeGuardImpl7<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7>(obj, memFun, p1, p2, p3, p4, p5, p6, p7);
}
~ObjScopeGuardImpl7() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_);
}
protected:
ObjScopeGuardImpl7(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7>
inline ObjScopeGuardImpl7<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
{
return ObjScopeGuardImpl7<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8>
class ObjScopeGuardImpl8 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl8<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
{
return ObjScopeGuardImpl8<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8>(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8);
}
~ObjScopeGuardImpl8() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_,p8_);
}
protected:
ObjScopeGuardImpl8(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7), p8_(p8) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8>
inline ObjScopeGuardImpl8<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
{
return ObjScopeGuardImpl8<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9>
class ObjScopeGuardImpl9 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl9<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9)
{
return ObjScopeGuardImpl9<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9>(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
~ObjScopeGuardImpl9() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_,p8_,p9_);
}
protected:
ObjScopeGuardImpl9(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7), p8_(p8), p9_(p9) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9>
inline ObjScopeGuardImpl9<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9)
{
return ObjScopeGuardImpl9<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10>
class ObjScopeGuardImpl10 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl10<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10)
{
return ObjScopeGuardImpl10<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
~ObjScopeGuardImpl10() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_);
}
protected:
ObjScopeGuardImpl10(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7), p8_(p8), p9_(p9), p10_(p10) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10>
inline ObjScopeGuardImpl10<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10)
{
return ObjScopeGuardImpl10<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10, typename P11>
class ObjScopeGuardImpl11 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl11<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>
MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11)
{
return ObjScopeGuardImpl11<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
}
~ObjScopeGuardImpl11() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_,p11_);
}
protected:
ObjScopeGuardImpl11(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7), p8_(p8), p9_(p9), p10_(p10), p11_(p11) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
const P11 p11_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10, typename P11>
inline ObjScopeGuardImpl11<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>
MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11)
{
return ObjScopeGuardImpl11<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
} template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10, typename P11, typename P12>
class ObjScopeGuardImpl12 : public ScopeGuardImplBase
{
public:
static ObjScopeGuardImpl12<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>
MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12)
{
return ObjScopeGuardImpl12<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
~ObjScopeGuardImpl12() throw()
{
SafeExecute(*this);
}
void Execute()
{
(obj_.*memFun_)(p1_, p2_,p3_,p4_,p5_,p6_,p7_,p8_,p9_,p10_,p11_,p12_);
}
protected:
ObjScopeGuardImpl12(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12)
: obj_(obj), memFun_(memFun), p1_(p1), p2_(p2), p3_(p3), p4_(p4), p5_(p5), p6_(p6), p7_(p7), p8_(p8), p9_(p9), p10_(p10), p11_(p11), p12_(p12) {}
Obj& obj_;
MemFun memFun_;
const P1 p1_;
const P2 p2_;
const P3 p3_;
const P4 p4_;
const P5 p5_;
const P6 p6_;
const P7 p7_;
const P8 p8_;
const P9 p9_;
const P10 p10_;
const P11 p11_;
const P12 p12_;
}; template <class Obj, typename MemFun, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6,
typename P7,typename P8, typename P9, typename P10, typename P11, typename P12>
inline ObjScopeGuardImpl12<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>
MakeObjGuard(Obj& obj, MemFun memFun, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12)
{
return ObjScopeGuardImpl12<Obj, MemFun, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12>::MakeObjGuard(obj, memFun, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
} NAMESPACE_CALL_HELPER_END
#endif

谈一下关于C++函数包装问题的更多相关文章

  1. Linux网络IO函数以及TCP连接函数包装

    标准I/O VS 网络IO 标准I/O又称为标准I/O流,从某种意义上讲是全双工的,因为程序能够在同一个流上执行输入和输出. Unix/Linux对网络的抽象是一种称为套接字的文件类型.和任何Unix ...

  2. 118.类包装器与lambda函数包装器(伪函数实现)

    #include <iostream> #include <list> using namespace std; //函数包装器,左边参数右边函数 template<cl ...

  3. 浅谈Kotlin中的函数

    本文首发于 vivo互联网技术 微信公众号 链接:https://mp.weixin.qq.com/s/UV23Uw_969oVhiOdo4ZKAw作者:连凌能 Kotlin,已经被Android官方 ...

  4. 浅谈 php 采用curl 函数库获取网页 cookie 和 带着cookie去访问 网页的方法!!!!

    由于近段时间帮朋友开发一个能够查询正方教务系统的微信公众平台号.有所收获.这里总结下个人经验. 开讲前,先吐槽一下新浪云服务器,一个程序里的   同一个函数  在PC测试可以正常运行,在它那里就会挂的 ...

  5. 浅谈reverse_iterator的base()函数

    非原创,原文链接:http://blog.csdn.net/shuchao/article/details/3705252 调用reverse_iterator的base成员函数可以产生"对 ...

  6. 浅谈javascript中stopImmediatePropagation函数和stopPropagation函数的区别

    在事件处理程序中,每个事件处理程序中间都会有一个event对象,而这个event对象有两个方法,一个是stopPropagation方法,一个是stopImmediatePropagation方法,两 ...

  7. 浅谈 js中parseInt函数的解析

    首先还是从很热门的实例parseInt("09")==0说起. parseInt(number,type)这个函数后面如果不跟第2个参数来表示进制的话,默认是10进制. 比如说pa ...

  8. 浅谈 js中parseInt函数的解析[转]

    首先还是从很热门的实例parseInt("09")==0说起. parseInt(number,type)这个函数后面如果不跟第2个参数来表示进制的话,默认是10进制. 比如说pa ...

  9. 浅谈DB2在线分析处理函数

    最近碰到一个测试需求,使用到了在线分析处理(OLAP),现总结记录一下,也希望能帮到有相关问题的朋友. 1. 测试环境是DB2,通过ETL(数据抽取,数据转换,数据加载)技术将数据源数据加载到目标数据 ...

随机推荐

  1. MyEclipse Spring被删之后,如何在myeclipse里面重新导入

    1.找到项目文件 2.用记事本打开 .project 把里面涉及到spring的全部删除就可以了.

  2. linux安装JDK TOMCAT

    1.下载包 到http://apr.apache.org/下载下面3个包 apr-1.4.2.tar.gz apr-iconv-1.2.1.tar.gz apr-util-1.3.10.tar.gz  ...

  3. HDOJ 1032(POJ 1207) The 3n + 1 problem

    Description Problems in Computer Science are often classified as belonging to a certain class of pro ...

  4. [待解决问题] 启动不了Android工程

    在使用 AudioInputStream sample = AudioSystem.getAudioInputStream(voiceSampleFile); 调用javax.sound.sample ...

  5. 突破LVS瓶颈,LVS Cluster部署(OSPF + LVS) - lxcong的运维技术 - 开源中国社区

    突破LVS瓶颈,LVS Cluster部署(OSPF + LVS) - lxcong的运维技术 - 开源中国社区 突破LVS瓶颈,LVS Cluster部署(OSPF + LVS)

  6. 从物理执行的角度透视spark Job

    本博文主要内容: 1.再次思考pipeline 2.窄依赖物理执行内幕 3.宽依赖物理执行内幕 4.Job提交流程 一:再次思考pipeline 即使采用pipeline的方式,函数f对依赖的RDD中 ...

  7. (转)Linux中的文件描述符

    本文转自:http://blog.csdn.net/cywosp/article/details/38965239 作者:cywosp 1. 概述 在Linux系统中一切皆可以看成是文件,文件又可分为 ...

  8. Jquery案例——某网站品牌列表的效果

    一下是效果图.点击"显示全部品牌",高亮推荐品牌,并显示全部品牌. HTML文件: <!DOCTYPE html> <html lang="en&quo ...

  9. ecshop格式化商品价格

    <?php /** * 格式化商品价格 * * @access public * @param float $price 商品价格 * @return string */ function pr ...

  10. 【OpenCV入门教程之一】 安装OpenCV:OpenCV 3.0、OpenCV 2.4.8、OpenCV 2.4.9 +VS 开发环境配置

    本系列文章由@浅墨_毛星云 出品,转载请注明出处.   文章链接:http://blog.csdn.net/poem_qianmo/article/details/19809337 作者:毛星云(浅墨 ...