X-Git-Url: https://git.dlugolecki.net.pl/?p=command.git;a=blobdiff_plain;f=tests%2Fcallable%2FTestCallableFunctionPointer.h;fp=tests%2Fcallable%2FTestCallableFunctionPointer.h;h=7fea87045200dacf0823ed10989ed91158235ceb;hp=0000000000000000000000000000000000000000;hb=e0fda02032d7d502e57e24eb218da9e24155541a;hpb=bba2a7fd86db452c2d9a1668ee649f6d4d51a581 diff --git a/tests/callable/TestCallableFunctionPointer.h b/tests/callable/TestCallableFunctionPointer.h new file mode 100644 index 0000000..7fea870 --- /dev/null +++ b/tests/callable/TestCallableFunctionPointer.h @@ -0,0 +1,27 @@ +#include "callable.h" + +using namespace command; + +template +class TestCallable : public Callable { +public: + TestCallable(void (*function)(ArgumentType)) + : Callable(function) { + } + + void callFunction(ArgumentType test) { + this->call(test); + } +}; + +template<> +class TestCallable : public Callable { +public: + TestCallable(void (*function)(void)) + : Callable(function) { + } + + void callFunction() { + this->call(); + } +};