diff --git a/signal0.h b/signal0.h index 09452de..0d55164 100644 --- a/signal0.h +++ b/signal0.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 0 parameter(s). // template -class slot0 : public slot_base +class slot0: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal0: public signal_base typedef T_return (*FUNCTION_POINTER)(); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot0* sNewFunc = new slot0_function( func ); @@ -175,7 +175,7 @@ class signal0: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot0* sNewMethod = new slot0_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal0: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot0_function sTest( func ); @@ -201,7 +201,7 @@ class signal0: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot0_method sTemp(p_object,p_member); diff --git a/signal1.h b/signal1.h index b66d7a7..ad250d2 100644 --- a/signal1.h +++ b/signal1.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 1 parameter(s). // template -class slot1 : public slot_base +class slot1: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal1: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot1* sNewFunc = new slot1_function( func ); @@ -175,7 +175,7 @@ class signal1: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot1* sNewMethod = new slot1_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal1: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot1_function sTest( func ); @@ -201,7 +201,7 @@ class signal1: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot1_method sTemp(p_object,p_member); diff --git a/signal10.h b/signal10.h index fcfc1c2..7a11acc 100644 --- a/signal10.h +++ b/signal10.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 10 parameter(s). // template -class slot10 : public slot_base +class slot10: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal10: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot10* sNewFunc = new slot10_function( func ); @@ -175,7 +175,7 @@ class signal10: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot10* sNewMethod = new slot10_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal10: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot10_function sTest( func ); @@ -201,7 +201,7 @@ class signal10: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot10_method sTemp(p_object,p_member); diff --git a/signal11.h b/signal11.h index dbb446a..8b9063e 100644 --- a/signal11.h +++ b/signal11.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 11 parameter(s). // template -class slot11 : public slot_base +class slot11: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal11: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot11* sNewFunc = new slot11_function( func ); @@ -175,7 +175,7 @@ class signal11: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot11* sNewMethod = new slot11_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal11: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot11_function sTest( func ); @@ -201,7 +201,7 @@ class signal11: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot11_method sTemp(p_object,p_member); diff --git a/signal12.h b/signal12.h index 170f2d2..ee20e26 100644 --- a/signal12.h +++ b/signal12.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 12 parameter(s). // template -class slot12 : public slot_base +class slot12: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal12: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10, T_arg11 a11); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot12* sNewFunc = new slot12_function( func ); @@ -175,7 +175,7 @@ class signal12: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot12* sNewMethod = new slot12_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal12: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot12_function sTest( func ); @@ -201,7 +201,7 @@ class signal12: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot12_method sTemp(p_object,p_member); diff --git a/signal13.h b/signal13.h index 5620fc1..84c8c0f 100644 --- a/signal13.h +++ b/signal13.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 13 parameter(s). // template -class slot13 : public slot_base +class slot13: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal13: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10, T_arg11 a11, T_arg12 a12); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot13* sNewFunc = new slot13_function( func ); @@ -175,7 +175,7 @@ class signal13: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot13* sNewMethod = new slot13_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal13: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot13_function sTest( func ); @@ -201,7 +201,7 @@ class signal13: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot13_method sTemp(p_object,p_member); diff --git a/signal14.h b/signal14.h index 1008664..4bf146a 100644 --- a/signal14.h +++ b/signal14.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 14 parameter(s). // template -class slot14 : public slot_base +class slot14: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal14: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10, T_arg11 a11, T_arg12 a12, T_arg13 a13); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot14* sNewFunc = new slot14_function( func ); @@ -175,7 +175,7 @@ class signal14: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot14* sNewMethod = new slot14_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal14: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot14_function sTest( func ); @@ -201,7 +201,7 @@ class signal14: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot14_method sTemp(p_object,p_member); diff --git a/signal15.h b/signal15.h index 4d6b8ab..a2c1f7a 100644 --- a/signal15.h +++ b/signal15.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 15 parameter(s). // template -class slot15 : public slot_base +class slot15: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal15: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10, T_arg11 a11, T_arg12 a12, T_arg13 a13, T_arg14 a14); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot15* sNewFunc = new slot15_function( func ); @@ -175,7 +175,7 @@ class signal15: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot15* sNewMethod = new slot15_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal15: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot15_function sTest( func ); @@ -201,7 +201,7 @@ class signal15: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot15_method sTemp(p_object,p_member); diff --git a/signal16.h b/signal16.h index f212354..85e11b5 100644 --- a/signal16.h +++ b/signal16.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 16 parameter(s). // template -class slot16 : public slot_base +class slot16: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal16: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8, T_arg9 a9, T_arg10 a10, T_arg11 a11, T_arg12 a12, T_arg13 a13, T_arg14 a14, T_arg15 a15); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot16* sNewFunc = new slot16_function( func ); @@ -175,7 +175,7 @@ class signal16: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot16* sNewMethod = new slot16_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal16: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot16_function sTest( func ); @@ -201,7 +201,7 @@ class signal16: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot16_method sTemp(p_object,p_member); diff --git a/signal2.h b/signal2.h index fd3254c..4e9ab8c 100644 --- a/signal2.h +++ b/signal2.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 2 parameter(s). // template -class slot2 : public slot_base +class slot2: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal2: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot2* sNewFunc = new slot2_function( func ); @@ -175,7 +175,7 @@ class signal2: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot2* sNewMethod = new slot2_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal2: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot2_function sTest( func ); @@ -201,7 +201,7 @@ class signal2: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot2_method sTemp(p_object,p_member); diff --git a/signal3.h b/signal3.h index 73a72d6..d18a84a 100644 --- a/signal3.h +++ b/signal3.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 3 parameter(s). // template -class slot3 : public slot_base +class slot3: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal3: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot3* sNewFunc = new slot3_function( func ); @@ -175,7 +175,7 @@ class signal3: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot3* sNewMethod = new slot3_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal3: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot3_function sTest( func ); @@ -201,7 +201,7 @@ class signal3: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot3_method sTemp(p_object,p_member); diff --git a/signal4.h b/signal4.h index bed0dd6..e1d049d 100644 --- a/signal4.h +++ b/signal4.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 4 parameter(s). // template -class slot4 : public slot_base +class slot4: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal4: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot4* sNewFunc = new slot4_function( func ); @@ -175,7 +175,7 @@ class signal4: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot4* sNewMethod = new slot4_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal4: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot4_function sTest( func ); @@ -201,7 +201,7 @@ class signal4: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot4_method sTemp(p_object,p_member); diff --git a/signal5.h b/signal5.h index 61fa3bc..a25900a 100644 --- a/signal5.h +++ b/signal5.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 5 parameter(s). // template -class slot5 : public slot_base +class slot5: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal5: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot5* sNewFunc = new slot5_function( func ); @@ -175,7 +175,7 @@ class signal5: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot5* sNewMethod = new slot5_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal5: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot5_function sTest( func ); @@ -201,7 +201,7 @@ class signal5: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot5_method sTemp(p_object,p_member); diff --git a/signal6.h b/signal6.h index 8eb23c2..fdf6b0c 100644 --- a/signal6.h +++ b/signal6.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 6 parameter(s). // template -class slot6 : public slot_base +class slot6: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal6: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot6* sNewFunc = new slot6_function( func ); @@ -175,7 +175,7 @@ class signal6: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot6* sNewMethod = new slot6_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal6: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot6_function sTest( func ); @@ -201,7 +201,7 @@ class signal6: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot6_method sTemp(p_object,p_member); diff --git a/signal7.h b/signal7.h index 3574865..c959b10 100644 --- a/signal7.h +++ b/signal7.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 7 parameter(s). // template -class slot7 : public slot_base +class slot7: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal7: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot7* sNewFunc = new slot7_function( func ); @@ -175,7 +175,7 @@ class signal7: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot7* sNewMethod = new slot7_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal7: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot7_function sTest( func ); @@ -201,7 +201,7 @@ class signal7: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot7_method sTemp(p_object,p_member); diff --git a/signal8.h b/signal8.h index 7ec2a70..2ba0f08 100644 --- a/signal8.h +++ b/signal8.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 8 parameter(s). // template -class slot8 : public slot_base +class slot8: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal8: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot8* sNewFunc = new slot8_function( func ); @@ -175,7 +175,7 @@ class signal8: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot8* sNewMethod = new slot8_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal8: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot8_function sTest( func ); @@ -201,7 +201,7 @@ class signal8: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot8_method sTemp(p_object,p_member); diff --git a/signal9.h b/signal9.h index 36dc174..d1f5cfe 100644 --- a/signal9.h +++ b/signal9.h @@ -15,7 +15,7 @@ // Abstract base class for slots with 9 parameter(s). // template -class slot9 : public slot_base +class slot9: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal9: public signal_base typedef T_return (*FUNCTION_POINTER)(T_arg0 a0, T_arg1 a1, T_arg2 a2, T_arg3 a3, T_arg4 a4, T_arg5 a5, T_arg6 a6, T_arg7 a7, T_arg8 a8); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot9* sNewFunc = new slot9_function( func ); @@ -175,7 +175,7 @@ class signal9: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot9* sNewMethod = new slot9_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal9: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot9_function sTest( func ); @@ -201,7 +201,7 @@ class signal9: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot9_method sTemp(p_object,p_member); diff --git a/signal_base.cpp b/signal_base.cpp index 26e9690..3432518 100644 --- a/signal_base.cpp +++ b/signal_base.cpp @@ -2,7 +2,7 @@ #include "signal_base.h" -signal_base::signal_base() : head(0), tail(0), bEmitting(false) +signal_base::signal_base() : head(0), tail(0), emitting(false) { // empty } @@ -13,7 +13,7 @@ signal_base::~signal_base() clear_list(); } -signal_base::signal_base( const signal_base& rSource ) : head(0), tail(0), bEmitting(false) +signal_base::signal_base( const signal_base& rSource ) : head(0), tail(0), emitting(false) { // Set an assert to let the user know that we don't support signal copying. // There are too many places where the signals are directly connected to objects, diff --git a/signal_base.h b/signal_base.h index 992d1ed..b0f2d13 100644 --- a/signal_base.h +++ b/signal_base.h @@ -32,7 +32,7 @@ class signal_base /** * Determines the number of slots that are connected to the signal. */ - int Count( void ); + int count( void ); protected: // linked list data structure @@ -97,12 +97,16 @@ class signal_base */ void remove_from_list(list_node* n); + protected: + /** * Removes any nodes that were tagged for deletion during the signal emit sequence */ void remove_pending_nodes( void ); //----------------------------------------------------------------------------------------------------------------------------------------- + protected: + list_node* head; list_node* tail; diff --git a/signal_template.h b/signal_template.h index cf36a59..0f64345 100644 --- a/signal_template.h +++ b/signal_template.h @@ -15,7 +15,7 @@ // Abstract base class for slots with ===NARG=== parameter(s). // template -class slot===NARG=== : public slot_base +class slot===NARG===: public slot_base { public: /** @@ -164,7 +164,7 @@ class signal===NARG===: public signal_base typedef T_return (*FUNCTION_POINTER)(===FORMAL_ARG_DECL===); // connect to normal functions - bool Connect( FUNCTION_POINTER func ) + bool connect( FUNCTION_POINTER func ) { // make a copy of the slot to store in our list slot===NARG===* sNewFunc = new slot===NARG===_function( func ); @@ -175,7 +175,7 @@ class signal===NARG===: public signal_base // connect to an object's method template - bool Connect(T_object* p_object, T_member p_member) + bool connect(T_object* p_object, T_member p_member) { // make a copy of the slot to store in our list slot===NARG===* sNewMethod = new slot===NARG===_method( p_object, p_member ); @@ -190,7 +190,7 @@ class signal===NARG===: public signal_base // // disconnect from a normal function - bool Disconnect( FUNCTION_POINTER func ) + bool disconnect( FUNCTION_POINTER func ) { // make a temporary slot we can use to find a match in the list slot===NARG===_function sTest( func ); @@ -201,7 +201,7 @@ class signal===NARG===: public signal_base // disconnect from an object's method template - bool Disconnect(T_object* p_object, T_member p_member) + bool disconnect(T_object* p_object, T_member p_member) { // make a temporary slot we can use to find a match in the list slot===NARG===_method sTemp(p_object,p_member); diff --git a/test.cpp b/test.cpp index aa8a653..abcbdda 100644 --- a/test.cpp +++ b/test.cpp @@ -2,8 +2,7 @@ #include -#include "slot.h" -#include "signal0.h" +#include "signal.h" class ParentFoo { @@ -35,37 +34,29 @@ public: } }; -Foo f; - bool somefunc() { printf("some func\n"); return true; } -template -slot0_method* make_slot(T_class* c, T_method m) +void anotherfunc(int x) { - return new slot0_method(c,m); + printf("got %d\n",x); } int main(int argc, char** argv) { - slot0* s = make_slot(&f,&Foo::Bar); - slot0* t = make_slot(&f,&ParentFoo::Bar); + Foo f; - slot0_function x( somefunc ); - slot0* u = &x; - - if ( *s == *t ) - (*s)(); - - (*u)(); - - signal0 sig; + signal sig; sig.connect(&f,&Foo::Bar); + sig.connect(&f,&ParentFoo::Bar); + sig.connect(&somefunc); sig(); -} - - + signal sigx; + sigx.connect(&anotherfunc); + sigx(12); + sigx(999); +} \ No newline at end of file