From 447744892436314b0dcdeb806f91b6a5a5284f8b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 24 Sep 2015 16:11:54 -0700 Subject: [PATCH] Replace SetOverrideResult/GetRecallIface with variadic templates. --- core-legacy/sourcehook/sourcehook.h | 245 +------------- core/sourcehook/generate/sourcehook.hxx | 19 +- core/sourcehook/sourcehook.h | 425 +----------------------- 3 files changed, 29 insertions(+), 660 deletions(-) diff --git a/core-legacy/sourcehook/sourcehook.h b/core-legacy/sourcehook/sourcehook.h index 575614b..f2ab54b 100644 --- a/core-legacy/sourcehook/sourcehook.h +++ b/core-legacy/sourcehook/sourcehook.h @@ -6289,258 +6289,37 @@ namespace SourceHook } }; - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)()) + // For manual hooks: + // The rettype is passed in manually + template + OverrideFunctor SetOverrideResult() { return OverrideFunctor(); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)()) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1)) + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params...)) { return OverrideFunctor(); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2)) + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params..., ...)) { return OverrideFunctor(); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2)) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params...)) { return reinterpret_cast(shptr->GetIfacePtr()); } - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3)) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params..., ...)) { return reinterpret_cast(shptr->GetIfacePtr()); } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, Param18, Param19, Param20)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - } #endif diff --git a/core/sourcehook/generate/sourcehook.hxx b/core/sourcehook/generate/sourcehook.hxx index 921942c..a5a4df4 100755 --- a/core/sourcehook/generate/sourcehook.hxx +++ b/core/sourcehook/generate/sourcehook.hxx @@ -1464,31 +1464,30 @@ namespace SourceHook { return OverrideFunctor(); } -@[$1,0,$a: - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(@[$2,1,$1|, :Param$2@])) + + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params...)) { return OverrideFunctor(); } - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(@[$2,1,$1:Param$2, @]...)) + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params..., ...)) { return OverrideFunctor(); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(@[$2,1,$1|, :Param$2@])) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params...)) { return reinterpret_cast(shptr->GetIfacePtr()); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(@[$2,1,$1:Param$2, @]...)) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params..., ...)) { return reinterpret_cast(shptr->GetIfacePtr()); } -@] } #endif diff --git a/core/sourcehook/sourcehook.h b/core/sourcehook/sourcehook.h index ba01c12..1ebc761 100644 --- a/core/sourcehook/sourcehook.h +++ b/core/sourcehook/sourcehook.h @@ -7056,438 +7056,29 @@ namespace SourceHook return OverrideFunctor(); } - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)()) + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params...)) { return OverrideFunctor(); } - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(...)) + template + OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params..., ...)) { return OverrideFunctor(); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)()) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params...)) { return reinterpret_cast(shptr->GetIfacePtr()); } - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(...)) + template + Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params..., ...)) { return reinterpret_cast(shptr->GetIfacePtr()); } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10, Param11, Param12, Param13, Param14, Param15, Param16, Param17, ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - } #endif