2012-04-19 20:58:29 +02:00
|
|
|
/*
|
|
|
|
* InspIRCd -- Internet Relay Chat Daemon
|
2007-07-25 17:03:16 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
|
|
|
|
* Copyright (C) 2007 Craig Edwards <craigedwards@brainbox.cc>
|
2012-10-20 22:14:46 -04:00
|
|
|
* Copyright (C) 2012 Adam <Adam@anope.org>
|
2007-07-25 17:03:16 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* This file is part of InspIRCd. InspIRCd is free software: you can
|
|
|
|
* redistribute it and/or modify it under the terms of the GNU General Public
|
|
|
|
* License as published by the Free Software Foundation, version 2.
|
2007-07-25 17:03:16 +00:00
|
|
|
*
|
2012-04-19 20:58:29 +02:00
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2007-07-25 17:03:16 +00:00
|
|
|
*/
|
|
|
|
|
2012-04-19 20:58:29 +02:00
|
|
|
|
2013-04-02 20:12:15 +01:00
|
|
|
#pragma once
|
2007-07-25 17:03:16 +00:00
|
|
|
|
2013-05-21 02:34:10 +01:00
|
|
|
#if defined HAS_CXX11_VARIADIC_TEMPLATES
|
2012-10-20 22:14:46 -04:00
|
|
|
|
|
|
|
template<typename ReturnType, typename... Args> class CoreExport Handler : public classbase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~Handler() { }
|
|
|
|
virtual ReturnType Call(Args...) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename ReturnType, typename... Args> class CoreExport Caller
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Handler<ReturnType, Args...>* target;
|
|
|
|
|
|
|
|
Caller(Handler<ReturnType, Args...>* initial) : target(initial) { }
|
|
|
|
virtual ~Caller() { }
|
|
|
|
|
|
|
|
virtual ReturnType operator()(const Args&... params)
|
|
|
|
{
|
|
|
|
return this->target->Call(params...);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Below here is compat with the old API */
|
|
|
|
#define HandlerBase0 Handler
|
|
|
|
#define HandlerBase1 Handler
|
|
|
|
#define HandlerBase2 Handler
|
|
|
|
#define HandlerBase3 Handler
|
|
|
|
#define HandlerBase4 Handler
|
|
|
|
#define HandlerBase5 Handler
|
|
|
|
#define HandlerBase6 Handler
|
|
|
|
#define HandlerBase7 Handler
|
|
|
|
#define HandlerBase8 Handler
|
|
|
|
|
|
|
|
#define caller1 Caller
|
|
|
|
#define caller2 Caller
|
|
|
|
#define caller3 Caller
|
|
|
|
#define caller4 Caller
|
|
|
|
#define caller5 Caller
|
|
|
|
#define caller6 Caller
|
|
|
|
#define caller7 Caller
|
|
|
|
#define caller8 Caller
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER0(NAME, RETURN) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN> { public: NAME() { } virtual RETURN Call(); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER1(NAME, RETURN, V1) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1> { public: NAME() { } virtual RETURN Call(V1); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER2(NAME, RETURN, V1, V2) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2> { public: NAME() { } virtual RETURN Call(V1, V2); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER3(NAME, RETURN, V1, V2, V3) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3> { public: NAME() { } virtual RETURN Call(V1, V2, V3); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER4(NAME, RETURN, V1, V2, V3, V4) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3, V4> { public: NAME() { } virtual RETURN Call(V1, V2, V3, V4); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER5(NAME, RETURN, V1, V2, V3, V4, V5) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3, V4, V5> { public: NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER6(NAME, RETURN, V1, V2, V3, V4, V5, V6) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3, V4, V5, V6> { public: NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER7(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3, V4, V5, V6, V7> { public: NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7); }
|
|
|
|
|
|
|
|
#define DEFINE_HANDLER8(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7, V8) \
|
|
|
|
class CoreExport NAME : public Handler<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { public: NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2008-09-20 20:53:04 +00:00
|
|
|
/** The templates below can be auto generated by tools/create_templates.pl.
|
2007-07-25 17:07:15 +00:00
|
|
|
* They are used to represent a functor with a given number of parameters and
|
|
|
|
* a specific return type. To prevent passing the wrong number of parameters
|
|
|
|
* and have the compiler detect this error at build-time, each class is numbered
|
|
|
|
* according to the number of parameters it takes, e.g. caller0, caller1, caller2.
|
|
|
|
* These have been generated from zero parameters to eight.
|
|
|
|
*
|
2007-10-15 20:59:05 +00:00
|
|
|
* If you want to declare a functor which takes two parameters, a User and a Channel,
|
2007-07-25 17:07:15 +00:00
|
|
|
* and returns bool, simply create it like this:
|
|
|
|
*
|
2007-10-15 20:59:05 +00:00
|
|
|
* caller2<bool, User*, Channel*> MyFunction;
|
2007-07-25 17:07:15 +00:00
|
|
|
*
|
|
|
|
* and initialize it correctly, when placed into a class you will be able to call it:
|
|
|
|
*
|
|
|
|
* bool n = someclass->MyFunction(someuser, somechan);
|
|
|
|
*
|
|
|
|
* These functor templates work this way so that you can simply and easily allow
|
|
|
|
* for these class methods to be overridden from within a module, e.g. have a module
|
2009-01-24 13:31:09 +00:00
|
|
|
* which completely replaces the code for IsNick, etc. For example, with the example
|
2007-07-26 19:57:14 +00:00
|
|
|
* above:
|
|
|
|
*
|
|
|
|
* MyNewFunction replaceme(ServerInstance);
|
|
|
|
*
|
2012-07-05 21:00:35 +01:00
|
|
|
* someclass->MyFunction = \&replaceme;
|
2007-07-26 19:57:14 +00:00
|
|
|
*
|
|
|
|
* After this point, calls to someclass->MyFunction will call the new code in your
|
|
|
|
* replacement functor.
|
|
|
|
*
|
|
|
|
* This is a very powerful feature which should be considered 'advanced' and not for
|
|
|
|
* beginners. If you do not understand these templates, STAY AWAY from playing with
|
|
|
|
* this until you do, as if you get this wrong, this can generate some pretty long
|
|
|
|
* winded and confusing error messages at compile time.
|
2007-07-25 17:07:15 +00:00
|
|
|
*/
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType> class CoreExport HandlerBase0 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call() = 0;
|
|
|
|
virtual ~HandlerBase0() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1> class CoreExport HandlerBase1 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1) = 0;
|
|
|
|
virtual ~HandlerBase1() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2> class CoreExport HandlerBase2 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2) = 0;
|
|
|
|
virtual ~HandlerBase2() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3> class CoreExport HandlerBase3 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3) = 0;
|
|
|
|
virtual ~HandlerBase3() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4> class CoreExport HandlerBase4 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3, Param4) = 0;
|
|
|
|
virtual ~HandlerBase4() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5> class CoreExport HandlerBase5 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3, Param4, Param5) = 0;
|
|
|
|
virtual ~HandlerBase5() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6> class CoreExport HandlerBase6 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3, Param4, Param5, Param6) = 0;
|
|
|
|
virtual ~HandlerBase6() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7> class CoreExport HandlerBase7 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3, Param4, Param5, Param6, Param7) = 0;
|
|
|
|
virtual ~HandlerBase7() { }
|
|
|
|
};
|
|
|
|
|
2009-10-14 22:12:55 +00:00
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7, typename Param8> class CoreExport HandlerBase8 : public classbase
|
2007-07-25 17:03:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ReturnType Call(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8) = 0;
|
|
|
|
virtual ~HandlerBase8() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename HandlerType> class CoreExport caller
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HandlerType* target;
|
|
|
|
|
|
|
|
caller(HandlerType* initial)
|
|
|
|
: target(initial)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ~caller() { }
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType> class CoreExport caller0 : public caller< HandlerBase0<ReturnType> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller0(HandlerBase0<ReturnType>* initial)
|
|
|
|
: caller< HandlerBase0<ReturnType> >::caller(initial)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() ()
|
|
|
|
{
|
|
|
|
return this->target->Call();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1> class CoreExport caller1 : public caller< HandlerBase1<ReturnType, Param1> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller1(HandlerBase1<ReturnType, Param1>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase1<ReturnType, Param1> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2> class CoreExport caller2 : public caller< HandlerBase2<ReturnType, Param1, Param2> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller2(HandlerBase2<ReturnType, Param1, Param2>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase2<ReturnType, Param1, Param2> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3> class CoreExport caller3 : public caller< HandlerBase3<ReturnType, Param1, Param2, Param3> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller3(HandlerBase3<ReturnType, Param1, Param2, Param3>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase3<ReturnType, Param1, Param2, Param3> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4> class CoreExport caller4 : public caller< HandlerBase4<ReturnType, Param1, Param2, Param3, Param4> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller4(HandlerBase4<ReturnType, Param1, Param2, Param3, Param4>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase4<ReturnType, Param1, Param2, Param3, Param4> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3, param4);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5> class CoreExport caller5 : public caller< HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller5(HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3, param4, param5);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6> class CoreExport caller6 : public caller< HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller6(HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3, param4, param5, param6);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7> class CoreExport caller7 : public caller< HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller7(HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3, param4, param5, param6, param7);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7, typename Param8> class CoreExport caller8 : public caller< HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
caller8(HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>* initial)
|
2007-08-15 20:41:30 +00:00
|
|
|
: caller< HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> >(initial)
|
2007-07-25 17:03:16 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7, Param8 param8)
|
|
|
|
{
|
|
|
|
return this->target->Call(param1, param2, param3, param4, param5, param6, param7, param8);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2007-07-25 17:41:06 +00:00
|
|
|
/** These shorthand macros are used to define a functor class which only implements Call(). Most functors are like this.
|
|
|
|
* If you want something more complex, define them by hand.
|
|
|
|
*
|
|
|
|
* The first parameter to each macro is the class name to define, the second parameter is the return value of Call().
|
|
|
|
* The following parameters are the parameter types for Call(), and again, the macro is numbered to match the number of
|
|
|
|
* parameters, to prevent mistakes.
|
|
|
|
*/
|
2007-07-25 17:36:13 +00:00
|
|
|
#define DEFINE_HANDLER0(NAME, RETURN) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase0<RETURN> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(); }
|
2007-07-25 17:36:13 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER1(NAME, RETURN, V1) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase1<RETURN, V1> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1); }
|
2007-07-25 17:36:13 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER2(NAME, RETURN, V1, V2) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase2<RETURN, V1, V2> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER3(NAME, RETURN, V1, V2, V3) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase3<RETURN, V1, V2, V3> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER4(NAME, RETURN, V1, V2, V3, V4) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase4<RETURN, V1, V2, V3, V4> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER5(NAME, RETURN, V1, V2, V3, V4, V5) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase5<RETURN, V1, V2, V3, V4, V5> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER6(NAME, RETURN, V1, V2, V3, V4, V5, V6) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase6<RETURN, V1, V2, V3, V4, V5, V6> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER7(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase7<RETURN, V1, V2, V3, V4, V5, V6, V7> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7); }
|
2007-07-25 17:41:06 +00:00
|
|
|
|
|
|
|
#define DEFINE_HANDLER8(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7, V8) \
|
2009-09-26 14:13:13 +00:00
|
|
|
class CoreExport NAME : public HandlerBase8<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }
|
2007-07-25 17:36:13 +00:00
|
|
|
|
2007-07-25 17:03:16 +00:00
|
|
|
#endif
|