From 6af2989d3abbe9ff64631df33f9f9e135274d90c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 20 Dec 2012 00:17:27 +0000 Subject: May as well update the pregen code as well. --- pregen/signals.h | 518 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 518 insertions(+) diff --git a/pregen/signals.h b/pregen/signals.h index 27364da..e8374e3 100644 --- a/pregen/signals.h +++ b/pregen/signals.h @@ -10,6 +10,7 @@ #include "bu/util.h" #include "bu/exceptionbase.h" +#include "bu/list.h" namespace Bu { @@ -121,6 +122,53 @@ namespace Bu new __Slot0F( pFnc ) ); } + + template + class SignalList0 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList0() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( ); + else + return (*i)( ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template<> + class SignalList0 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList0() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_0 #ifndef BU_SIGNAL_PARAM_COUNT_1 @@ -229,6 +277,53 @@ namespace Bu new __Slot1F( pFnc ) ); } + + template + class SignalList1 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList1() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1 ); + else + return (*i)( p1 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList1 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList1() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_1 #ifndef BU_SIGNAL_PARAM_COUNT_2 @@ -337,6 +432,53 @@ namespace Bu new __Slot2F( pFnc ) ); } + + template + class SignalList2 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList2() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2 ); + else + return (*i)( p1, p2 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList2 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList2() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_2 #ifndef BU_SIGNAL_PARAM_COUNT_3 @@ -445,6 +587,53 @@ namespace Bu new __Slot3F( pFnc ) ); } + + template + class SignalList3 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList3() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3 ); + else + return (*i)( p1, p2, p3 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList3 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList3() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_3 #ifndef BU_SIGNAL_PARAM_COUNT_4 @@ -553,6 +742,53 @@ namespace Bu new __Slot4F( pFnc ) ); } + + template + class SignalList4 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList4() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4 ); + else + return (*i)( p1, p2, p3, p4 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList4 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList4() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_4 #ifndef BU_SIGNAL_PARAM_COUNT_5 @@ -661,6 +897,53 @@ namespace Bu new __Slot5F( pFnc ) ); } + + template + class SignalList5 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList5() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5 ); + else + return (*i)( p1, p2, p3, p4, p5 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList5 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList5() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_5 #ifndef BU_SIGNAL_PARAM_COUNT_6 @@ -769,6 +1052,53 @@ namespace Bu new __Slot6F( pFnc ) ); } + + template + class SignalList6 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList6() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5, p6 ); + else + return (*i)( p1, p2, p3, p4, p5, p6 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList6 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList6() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5, p6 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_6 #ifndef BU_SIGNAL_PARAM_COUNT_7 @@ -877,6 +1207,53 @@ namespace Bu new __Slot7F( pFnc ) ); } + + template + class SignalList7 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList7() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5, p6, p7 ); + else + return (*i)( p1, p2, p3, p4, p5, p6, p7 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList7 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList7() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5, p6, p7 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_7 #ifndef BU_SIGNAL_PARAM_COUNT_8 @@ -985,6 +1362,53 @@ namespace Bu new __Slot8F( pFnc ) ); } + + template + class SignalList8 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList8() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8 ); + else + return (*i)( p1, p2, p3, p4, p5, p6, p7, p8 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList8 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList8() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_8 #ifndef BU_SIGNAL_PARAM_COUNT_9 @@ -1093,6 +1517,53 @@ namespace Bu new __Slot9F( pFnc ) ); } + + template + class SignalList9 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList9() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8, p9t p9 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9 ); + else + return (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList9 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList9() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8, p9t p9 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_9 #ifndef BU_SIGNAL_PARAM_COUNT_10 @@ -1201,6 +1672,53 @@ namespace Bu new __Slot10F( pFnc ) ); } + + template + class SignalList10 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList10() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + ret operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8, p9t p9, p10t p10 ) + { + typename MyType::iterator i, n; + for(i = MyType::begin(); i; i=n) + { + n = i; + n++; + if( n ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ); + else + return (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ); + } + throw Bu::ExceptionBase("Empty SignalList with non-void return value called."); + } + }; + + template + class SignalList10 : public Bu::List > + { + typedef Bu::List > MyType; + public: + SignalList10() + { + } + + using MyType::iterator; + using MyType::const_iterator; + + void operator()( p1t p1, p2t p2, p3t p3, p4t p4, p5t p5, p6t p6, p7t p7, p8t p8, p9t p9, p10t p10 ) + { + for( typename MyType::iterator i = MyType::begin(); i; i++ ) + (*i)( p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 ); + } + }; #endif // BU_SIGNAL_PARAM_COUNT_10 }; -- cgit v1.2.3