程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> 談一下信號分發器的作用及實現方法,信號分發實現

談一下信號分發器的作用及實現方法,信號分發實現

編輯:C++入門知識

談一下信號分發器的作用及實現方法,信號分發實現


信號分發器在很多游戲項目中都有使用,是一種典型的觀察者模式。在游戲編程中,客戶端的繪制往往需要靠邏輯數據來驅動,繪制通過監聽信號等待邏輯的通知。當然了,邏輯模塊跟邏輯模塊相互之間的通知也可以使用信號。這種編程模式能夠簡化模塊之間的通信問題,不需要引用煩人的指針調用,導致指針滿屏飛的情況。C++惡心的地方就是在大型項目中,指針相當多。

那邊,實現一個信號分發器需要哪些功能呢?我們知道,所謂的信號通知,無非就是函數調用。監聽一個信號,其本質上就是綁定一個指針,這個問題的難點在於函數指針是各式各樣的,那麼我們怎麼樣來管理這些指針呢?畢竟我們是想通過一個類似list的集合來保存這些指針。有的人可能會想到用同一種list保持同一種指針,因為一個信號也許只對應一種函數簽名,如果你采用了這種方法,那麼很不幸告訴你,你實現起來會困難重重。要是在Java上,這個問題很好解決,因為JAVA上所有的引用類型對象都自動繼承自Object對象。在C++上,解決這個問題一有兩種方法:1是把所有的指針轉換成int數值,這個能解決指針存問題。2是借用函數包裝。這兩種方法中,方法1顯的很粗糙,無法實現類型安全檢查;方法2就顯示的很優雅,而且能在編譯時期進行接口信號是否匹配問題的檢查。那麼接下來我們的討論將以方法2為准,來講解一個實現。

上面的指針保存問題是實現信號分發器遇到第一個要解決的問題。第二個問題就是,采用函數包裝這種方式,為了方便函數調用,我們需要對參數進行序列化。

以下是一個信號分發器的實現原理的大體流程:

1.綁定一個信號,即有一個類似這樣的結構: std::map<int,std::list<func_ptr>>, 將函數指針放入信號對應的函數指針集中。

2.對這個信號進行通知,即通知這個信號找到對應的std::list<func_ptr>, 然後將傳遞的參數進行序列化,將之傳送到相應的處理例程,由相應的處理例程對參數進行反序列化,解析出各個參數,遍歷std::list<func_ptr>集合調用函數。

至此過程完畢,沒錯,就是這麼簡單。

總結一下需要用到的相應的庫:一個類型萃取庫traits,一個序列化庫serialization,一個函數包裝庫callhelper。如果看過我之前博文的同學,那麼就會注意到在下的小心機了,這三個庫在下都一一按順序發布過了。

接下來簡單介紹下這個信號分發器的相應用法及主要功能。

這個庫實現的主要三個優點:

1. 在調一次信號時只會產生一次序列化和一次反序列化消耗,這個應該是不可避免。大家要是有好的方法歡迎來討論長知識(我見過會產生一次序列化和n次反序列化的信號庫實現,原來公司項目中使用的一次實現就是這樣,這個其實是沒有必要的)。

2. 這個信號庫允許一個信號對應多個不同簽名的調用接口,至少實戰中到底有沒有這個必要,這裡暫時不討論。

3. 支持引用類型及指針類型的傳遞。

一個額外的支持就是這個庫可以增加信號過濾器的,這個過濾器代碼我就不貼出了。

接下來貼代碼,說的再多,不如看代碼:

#include "signalcall2/signalcall2.hpp"

// 聲明一個信號並綁定一類簽名
DECLARE_SIGNAL2(SIG_TEST,1,void(std::string&))
// 使用同一個信號並綁定別一類簽名
VALIDE_SIGNAL(SIG_TEST,void(std::string ,int))

int main()
{
    // 定義一個類對象
    Stu stu;

    // 定義一個信號分發器對象
    signalcall::signalcall2 sig; // 你可能會好奇為什麼是signalcall2,因為我還實現過一個版本1,這是版本2,版本1並不具備版本2的優雅性。
    // 綁定信號
    // 前兩個接口是同一類型的簽名
    sig.bindSignal<SIG_TEST>(show);
    sig.bindSignal<SIG_TEST>(&stu,&Stu::show);
    // 這個接口是不同的簽名
    sig.bindSignal<SIG_TEST>(show2);

    // sig.bindSignal<SIG_TEST>(show3); // 當試圖綁定show3函數,會編譯不過,因為並沒指聲明信號SIG_TEST對應void(int)類型簽名

    // 通知信號
    std::string str = "你好,我是字符串!";
    // 只會通知到void(std::string&)類型的接口
    sig.signal<SIG_TEST>(str);

    // 只會通知到void(std::string,int)類型的接口
    sig.signal<SIG_TEST>("我是void(std::string,int)類型的接口",1);

   // 解綁信號相應的接口
   sig.unbindSignal<SIG_TEST>(show);


   // 或者解決信號的所有接口
   sig.unbindAllSignal();

return 0;
}

輸出結果:

接下來是完整類庫截圖

//signalcall_config2.hpp
#ifndef SIGNALCALL_CONFIG2_INCLUDE
#define SIGNALCALL_CONFIG2_INCLUDE

#define NAMESPACE_SIGNALCALL_BEGIN    namespace signalcall{
#define NAMESPACE_SIGNALCALL_END    }

#include "serialization/archive.hpp"
#include "call_helper/call.hpp"

NAMESPACE_SIGNALCALL_BEGIN

typedef serialization::default_string_oarchive OArchive;
typedef serialization::default_string_iarchive IArchive;



NAMESPACE_SIGNALCALL_END
#endif
//signal_type2.hpp
#ifndef SIGNAL_TYPE_INCLUDE
#define SIGNAL_TYPE_INCLUDE

#include "traits/traits.hpp"

typedef unsigned int SigID; //消息ID的格式
typedef unsigned int ParamC; //函數參數個數

template<SigID sigID,ParamC paramC> struct signature_trait;

/**分一步直接定義信號**/
#define DECLARE_SIGNAL2(signal_name, signal_id, signature)                                            \
    enum {signal_name = signal_id};                                                                    \
                                                                                                    \
template<>                                                                                            \
struct signature_trait<signal_name,traits::function_traits<signature>::arity>                        \
{                                                                                                    \
    typedef traits::function_traits<signature>::Function_Type Function_Type;                        \
    typedef traits::function_traits<signature>::FunctionP_Type FunctionP_Type;                        \
};


/**分兩步定義信號**/
#define DECLARE_SIGNAL(signal_name,signal_id)                                                        \
    enum {signal_name = signal_id};


#define VALIDE_SIGNAL(signal_name,signature2)                                                        \
                                                                                                    \
template<>                                                                                            \
struct signature_trait<signal_name,traits::function_traits<signature2>::arity>                        \
{                                                                                                    \
    typedef traits::function_traits<signature2>::Function_Type Function_Type;                                \
    typedef traits::function_traits<signature2>::FunctionP_Type FunctionP_Type;                        \
};




#endif
//signalcall2.hpp
#ifndef SIGNALCALL2_INCLUDE
#define SIGNALCALL2_INCLUDE

#include "signalcall_config2.hpp"
#include "signal_type2.hpp"
#include <map>
#include <list>
#include <cassert>

NAMESPACE_SIGNALCALL_BEGIN

struct call_list_container
{
    call_list_container():_func(0),_method(0){}
    callhelper::basic_call_container* _func;
    callhelper::basic_call_container* _method;
};

typedef std::map<ParamC,call_list_container> param_callcontainer_map;
typedef std::map<SigID,param_callcontainer_map> sig_paramc_callcontainer_map;


class signalcall2
{
protected:
    sig_paramc_callcontainer_map _sig_paramc_callcontainer_map;

    void _call(SigID id,ParamC c,std::string& str)
    {
        sig_paramc_callcontainer_map::iterator iter = _sig_paramc_callcontainer_map.find(id);
        if (iter!=_sig_paramc_callcontainer_map.end())
        {
            param_callcontainer_map::iterator iter2 = iter->second.find(c);
            if (iter2!=iter->second.end())
            {
                if (iter2->second._func!=0)
                {
                    IArchive iarc(str);
                    iter2->second._func->call(iarc);
                }
                if (iter2->second._method!=0)
                {
                    IArchive iarc(str);
                    iter2->second._method->call(iarc);
                }
            }
        }

        return ;
    }

    signalcall2(const signalcall2&);

    signalcall2& operator =(const signalcall2&);

public:
    signalcall2(){}

    virtual ~signalcall2()
    {
        unbindAllSignal();
    }

    template<SigID sigID,typename classtype,typename funtype>
    void bindSignal(classtype* obj,funtype fun)
    {
        // 安全檢查
        typedef signature_trait<sigID,traits::mfunction_traits<funtype>::arity>::FunctionP_Type _FunctionP_Type;
        typename traits::fun_to_mem_converter<_FunctionP_Type,classtype>::MFunctionP_Type security_check(fun);

        typedef callhelper::call_container<std::set<callhelper::call_helper<funtype,classtype> >,funtype,classtype> Call_Container_Type;

        sig_paramc_callcontainer_map::iterator iter = _sig_paramc_callcontainer_map.find(sigID);
        if (iter==_sig_paramc_callcontainer_map.end())
        {
            param_callcontainer_map _map;
            _sig_paramc_callcontainer_map[sigID] = _map;
            iter = _sig_paramc_callcontainer_map.find(sigID);
        }

        const int count = traits::mfunction_traits<funtype>::arity;
        param_callcontainer_map::iterator iter2 = iter->second.find(count);
        if (iter2==iter->second.end())
        {
            call_list_container c_list_ontainer;
            iter->second[count] = c_list_ontainer;
            iter2 = iter->second.find(count);
        }

        if (iter2->second._method==0)
        {
            iter2->second._method = new Call_Container_Type;
        }

        callhelper::call_helper<funtype,classtype> c_helper(obj,fun);
        Call_Container_Type& c_container = dynamic_cast<Call_Container_Type&>(*(iter2->second)._method);
        c_container._container.insert(c_helper);
    }

    template<SigID sigID,typename funtype>
    void bindSignal(funtype fun)
    {
        // 安全檢查
        typename signature_trait<sigID,traits::function_traits<funtype>::arity>::FunctionP_Type security_check(fun);

        typedef callhelper::call_container<std::set<callhelper::call_helper<funtype,void> >,funtype,void> Call_Container_Type;

        sig_paramc_callcontainer_map::iterator iter = _sig_paramc_callcontainer_map.find(sigID);
        if (iter==_sig_paramc_callcontainer_map.end())
        {
            param_callcontainer_map _map;
            _sig_paramc_callcontainer_map[sigID] = _map;
            iter = _sig_paramc_callcontainer_map.find(sigID);
        }

        const int count = traits::function_traits<funtype>::arity;
        param_callcontainer_map::iterator iter2 = iter->second.find(count);
        if (iter2==iter->second.end())
        {
            call_list_container c_list_ontainer;
            iter->second[count] = c_list_ontainer;
            iter2 = iter->second.find(count);
        }

        if (iter2->second._func==0)
        {
            iter2->second._func = new Call_Container_Type;
        }

        callhelper::call_helper<funtype,void> c_helper(fun);
        Call_Container_Type& c_container = dynamic_cast<Call_Container_Type&>(*(iter2->second)._func);
        c_container._container.insert(c_helper);
    }

    template<SigID sigID,typename classtype,typename funtype>
    void unbindSignal(classtype* obj,funtype fun)
    {
        // 安全檢查
        typename signature_trait<sigID,traits::function_traits<funtype>::arity>::FunctionP_Type security_check(fun);

        sig_paramc_callcontainer_map::iterator iter = _sig_paramc_callcontainer_map.find(sigID);
        if (iter!=_sig_paramc_callcontainer_map.end())
        {
            const int count = traits::mfunction_traits<funtype>::arity;
            param_callcontainer_map::iterator iter2 = iter->second.find(count);
            if (iter2!=iter->second.end())
            {
                if (iter2->second._method!=0)
                {
                    typedef callhelper::call_container<std::set<callhelper::call_helper<funtype,classtype> >,funtype,classtype> Call_Container_Type;
                    Call_Container_Type& c_container = (Call_Container_Type&)(*(iter2->second)._method);

                    callhelper::call_helper<funtype,classtype> c_helper(obj,fun);
                    c_container._container.erase(c_helper);

                    if (c_container._container.size()==0)
                    {
                        delete (iter2->second._method);
                        iter2->second._method = 0;
                    }
                }

                if (!iter2->second._func && !iter2->second._method)
                {
                    iter->second.erase(iter2);
                }
            }

            if (iter->second.size()==0)
            {
                _sig_paramc_callcontainer_map.erase(iter);
            }
        }
    }

    template<SigID sigID,typename funtype>
    void unbindSignal(funtype fun)
    {
        // 安全檢查
        typename signature_trait<sigID,traits::function_traits<funtype>::arity>::FunctionP_Type security_check(fun);

        sig_paramc_callcontainer_map::iterator iter = _sig_paramc_callcontainer_map.find(sigID);
        if (iter!=_sig_paramc_callcontainer_map.end())
        {
            const int count = traits::function_traits<funtype>::arity;
            param_callcontainer_map::iterator iter2 = iter->second.find(count);
            if (iter2!=iter->second.end())
            {
                if (iter2->second._func!=0)
                {
                    typedef callhelper::call_container<std::set<callhelper::call_helper<funtype,void> >,funtype,void> Call_Container_Type;
                    Call_Container_Type& c_container = (Call_Container_Type&)(*(iter2->second)._func);

                    callhelper::call_helper<funtype,void> c_helper(fun);
                    c_container._container.erase(c_helper);

                    if (c_container._container.size()==0)
                    {
                        delete (iter2->second._func);
                        iter2->second._func = 0;
                    }
                }

                if (!iter2->second._func && !iter2->second._method)
                {
                    iter->second.erase(iter2);
                }
            }

            if (iter->second.size()==0)
            {
                _sig_paramc_callcontainer_map.erase(iter);
            }
        }
    }

    void unbindAllSignal()
    {
        for (sig_paramc_callcontainer_map::iterator iter=_sig_paramc_callcontainer_map.begin();
            iter!=_sig_paramc_callcontainer_map.end(); ++iter)
        {
            for (param_callcontainer_map::iterator iter2=iter->second.begin();
                iter2!=iter->second.end(); ++iter2)
            {
                delete (iter2->second._func);
                delete (iter2->second._method);

                iter2->second._func = 0;
                iter2->second._method = 0;
            }
            iter->second.clear();
        }
        _sig_paramc_callcontainer_map.clear();
    }

    template<SigID sigID>
    void signal()
    {
        typedef typename signature_trait<sigID,0>::Function_Type Function_Type;
        _call(sigID,0,std::string(""));
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,1>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,1>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,1,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,2>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,2>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,2>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,2>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,2,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,3>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,3,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,4>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,4,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,5>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,5,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,6>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,6,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,7>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,7,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,8>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,8,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,9>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,9,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,10>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,10,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,11>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,11,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,12>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,12,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,13>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,13,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,14>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,14,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,15>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,15,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg16 p16,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg16>(p16,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,16>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,16,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg17 p17,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg16 p16,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg17>(p17,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg16>(p16,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,17>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,17,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg18 p18,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg17 p17,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg16 p16,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg18>(p18,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg17>(p17,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg16>(p16,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,18>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,18,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg19 p19,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg18 p18,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg17 p17,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg16 p16,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg19>(p19,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg18>(p18,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg17>(p17,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg16>(p16,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,19>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,19,str);
    }

    template<SigID sigID>
    void signal(
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg20 p20,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg19 p19,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg18 p18,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg17 p17,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg16 p16,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg15 p15,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg14 p14,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg13 p13,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg12 p12,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg11 p11,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg10 p10,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg9 p9,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg8 p8,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg7 p7,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg6 p6,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg5 p5,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg4 p4,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg3 p3,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg2 p2,
        typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg1 p1
        )
    {
        std::string str;
        OArchive oarc(str);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg20>(p20,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg19>(p19,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg18>(p18,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg17>(p17,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg16>(p16,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg15>(p15,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg14>(p14,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg13>(p13,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg12>(p12,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg11>(p11,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg10>(p10,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg9>(p9,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg8>(p8,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg7>(p7,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg6>(p6,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg5>(p5,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg4>(p4,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg3>(p3,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg2>(p2,oarc);
        callhelper::param_set<typename traits::function_traits<typename signature_trait<sigID,20>::Function_Type>::arg1>(p1,oarc);

        _call(sigID,20,str);
    }
};




NAMESPACE_SIGNALCALL_END
#endif

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved