GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by godecho
1
 
        // Overloaded 'fire' function
        void fire();
 
        template <class p1>
        void fire(const p1& parm1);
     
        template <class p1, class p2>
        void fire(const p1& parm1, const p1& parm2);

        template <class p1, class p2, class p3>
        void fire(const p1& parm1, const p2& param2, const p3& param3);
     
        template <class p1, class p2, class p3, class p4>
        void fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4);

        template <class p1, class p2, class p3, class p4, class p5>
        void fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5);
     
        template <class p1, class p2, class p3, class p4, class p5, class p6>
        void fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6);

        template <class p1, class p2, class p3, class p4, class p5, class p6, class p7>
        void fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6, const p7& param7);
     
        template <class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8>
        void fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6, const p7& param7, const p8& param8);


///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
void Event<tDelegate>::fire()
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())();
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1>
void Event<tDelegate>::fire(const p1& parm1)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2>
void Event<tDelegate>::fire(const p1& parm1, const p1& parm2)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3, class p4>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3, param4);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3, class p4, class p5>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3, param4, param5);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3, class p4, class p5, class p6>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3, param4, param5, param6);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3, class p4, class p5, class p6, class p7>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6, const p7& param7)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3, param4, param5, param6, param7);
    }
}
    
///////////////////////////////////////////////////////////////////////
    
template <class tDelegate>
template <class p1, class p2, class p3, class p4, class p5, class p6, class p7, class p8>
void Event<tDelegate>::fire(const p1& parm1, const p2& param2, const p3& param3, const p4& param4, const p5& param5, const p6& param6, const p7& param7, const p8& param8)
{
    if(!delegates_.empty())
    {
        (*delegates_.begin())(param1, param2, param3, param4, param5, param6, param7, param8);
    }
}
    
///////////////////////////////////////////////////////////////////////