From c39ccd1fdaef9ac6fd62888badc0240e8a88c55a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 25 Jul 2007 17:41:06 +0000 Subject: Add macros up to 8 parameters git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7570 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/caller.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/caller.h b/include/caller.h index 396a5ba5a..4b4651b33 100644 --- a/include/caller.h +++ b/include/caller.h @@ -237,6 +237,14 @@ template { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(); }; @@ -244,7 +252,25 @@ template { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1); }; #define DEFINE_HANDLER2(NAME, RETURN, V1, V2) \ - class CoreExport NAME : public HandlerBase2 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V2); }; + class CoreExport NAME : public HandlerBase2 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2); }; + +#define DEFINE_HANDLER3(NAME, RETURN, V1, V2, V3) \ + class CoreExport NAME : public HandlerBase3 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3); }; + +#define DEFINE_HANDLER4(NAME, RETURN, V1, V2, V3, V4) \ + class CoreExport NAME : public HandlerBase4 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4); }; + +#define DEFINE_HANDLER5(NAME, RETURN, V1, V2, V3, V4, V5) \ + class CoreExport NAME : public HandlerBase5 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); }; + +#define DEFINE_HANDLER6(NAME, RETURN, V1, V2, V3, V4, V5, V6) \ + class CoreExport NAME : public HandlerBase6 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~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 HandlerBase7 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~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 HandlerBase8 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }; #endif -- cgit v1.2.3