X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=misc%2Fmediasource%2Fnetradiant-src%2Flibs%2Fsignal%2Fsignal.cpp;fp=misc%2Fmediasource%2Fnetradiant-src%2Flibs%2Fsignal%2Fsignal.cpp;h=0000000000000000000000000000000000000000;hp=617a3a4e486e786fd3edf5b9f50da5e2c1d98155;hb=2376f1d3e3ea56046cca61d87cb8d648034e1a11;hpb=71c85af29fb024d5657f383c6e6f33720cd2c25e diff --git a/misc/mediasource/netradiant-src/libs/signal/signal.cpp b/misc/mediasource/netradiant-src/libs/signal/signal.cpp deleted file mode 100644 index 617a3a4e..00000000 --- a/misc/mediasource/netradiant-src/libs/signal/signal.cpp +++ /dev/null @@ -1,105 +0,0 @@ - -#include "signal.h" - - - -namespace -{ - class Test - { - }; - class A1 - { - }; - class A2 - { - }; - class A3 - { - }; - - SignalHandlerResult handler0(Test&) - { - return SIGNAL_CONTINUE_EMISSION; - } - typedef Function1 TestHandler0; - - int function0(Test&) - { - return 7; - } - typedef Function1 TestFunction0; - - SignalHandlerResult handler1(Test&, A1) - { - return SIGNAL_CONTINUE_EMISSION; - } - typedef Function2 TestHandler1; - - void function1(Test&, A1) - { - } - typedef ReferenceCaller1 TestFunction1; - - SignalHandlerResult handler2(Test&, A1, A2) - { - return SIGNAL_CONTINUE_EMISSION; - } - typedef Function3 TestHandler2; - - void function2(Test&, A1, A2) - { - } - typedef Function3 TestFunction2; - - SignalHandlerResult handler3(Test&, A1, A2, A3) - { - return SIGNAL_CONTINUE_EMISSION; - } - typedef Function4 TestHandler3; - - void function3(Test&, A1, A2, A3) - { - } - typedef Function4 TestFunction3; - - void testSignals() - { - Test test; - { - Signal0 e0; - Signal0::handler_id_type a = e0.connectLast(makeSignalHandler(TestHandler0(), test)); // signal handler from direct caller returning result - Signal0::handler_id_type b = e0.connectFirst(makeSignalHandler(TestFunction0(), test)); // signal handler from direct caller returning int - e0(); - e0.disconnect(a); - e0.disconnect(b); - } - { - typedef Signal1 Signal1Test; - Signal1Test e1; - Signal1Test::handler_id_type a = e1.connectLast(makeSignalHandler1(TestHandler1(), test)); // signal handler from direct caller with one argument, returning result - Signal1Test::handler_id_type b = e1.connectFirst(makeSignalHandler1(TestFunction1(test))); // signal handler from opaque caller with one argument, returning void - e1(A1()); - e1.disconnect(a); - e1.disconnect(b); - } - { - typedef Signal2 Signal2Test; - Signal2Test e2; - Signal2Test::handler_id_type a = e2.connectLast(makeSignalHandler2(TestHandler2(), test)); // signal handler from direct caller with two arguments, returning result - Signal2Test::handler_id_type b = e2.connectLast(makeSignalHandler2(TestFunction2(), test)); // signal handler from direct caller with two arguments, returning void - e2(A1(), A2()); - e2.disconnect(a); - e2.disconnect(b); - } - { - typedef Signal3 Signal3Test; - Signal3Test e3; - Signal3Test::handler_id_type a = e3.connectLast(makeSignalHandler3(TestHandler3(), test)); // signal handler from direct caller with three arguments, returning result - Signal3Test::handler_id_type b = e3.connectLast(makeSignalHandler3(TestFunction3(), test)); // signal handler from direct caller with three arguments, returning void - e3(A1(), A2(), A3()); - e3.disconnect(a); - e3.disconnect(b); - } - } -}