template<typename R,
typename Arg20,
typename Arg19,
typename Arg18,
typename Arg17,
typename Arg16,
typename Arg15,
typename Arg14,
typename Arg13,
typename Arg12,
typename Arg11,
typename Arg10,
typename Arg9,
typename Arg8,typename Arg7,typename Arg6,typename Arg5,typename Arg4,typename Arg3,typename Arg2,typename Arg1>
struct function_traits_helper<R(*)(Arg20,Arg19,Arg18,Arg17,Arg16,Arg15,Arg14,Arg13,Arg12,Arg11,Arg10,Arg9,Arg8,Arg7,Arg6,Arg5,Arg4,Arg3,Arg2,Arg1)>
{
typedef Arg20 arg20;
typedef Arg19 arg19;
typedef Arg18 arg18;
typedef Arg17 arg17;
typedef Arg16 arg16;
typedef Arg15 arg15;
typedef Arg14 arg14;
typedef Arg13 arg13;
typedef Arg11 arg11;
typedef Arg10 arg10;
typedef Arg9 arg9;
typedef Arg8 arg8;
typedef Arg7 arg7;
typedef Arg6 arg6;
typedef Arg5 arg5;
typedef Arg4 arg4;
typedef Arg3 arg3;
typedef Arg2 arg2;
typedef Arg1 arg1;
enum{arity = 20};
typedef R result_type;
};
template<typename _Function_Type>
struct function_traits : public function_traits_helper<typename function_pointer_traits<_Function_Type>::FunctionP_Type>
{
typedef typename function_pointer_traits<_Function_Type>::Function_Type Function_Type;
typedef typename function_pointer_traits<_Function_Type>::FunctionP_Type FunctionP_Type;
};
NAMESPACE_TRAITS_END
#endif
########################
########################
// fun_to_mem_converter.hpp
#ifndef FUN_TO_MEM_CONVERTER_INCLUDE
#define FUN_TO_MEM_CONVERTER_INCLUDE
#include "traits_config.hpp"
#include "function_traits.hpp"
NAMESPACE_TRAITS_BEGIN
template<int Arity,typename classtype, typename funtype>
struct fun_to_mem_converter_helper;
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<0,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef typename _traits::result_type(classtype::*MFunctionP_Type)();
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<1,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef typename _traits::result_type(classtype::*MFunctionP_Type)(typename _traits::arg1);
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<2,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef typename _traits::result_type(classtype::*MFunctionP_Type)(typename _traits::arg2,typename _traits::arg1);
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<3,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef typename _traits::result_type(classtype::*MFunctionP_Type)(typename _traits::arg3,typename _traits::arg2,typename _traits::arg1);
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<4,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef
typename _traits::result_type(classtype::*MFunctionP_Type)
(
typename _traits::arg4,
typename _traits::arg3,
typename _traits::arg2,
typename _traits::arg1);
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<5,classtype,funtype>
{
typedef function_traits<funtype> _traits;
typedef
typename _traits::result_type(classtype::*MFunctionP_Type)
(
typename _traits::arg5,
typename _traits::arg4,
typename _traits::arg3,
typename _traits::arg2,
typename _traits::arg1);
};
template<typename classtype,typename funtype>
struct fun_to_mem_converter_helper<6,classtype,funtype>
{
typedef function_traits<funtype> _traits;