From 8ba750c2d52b9db90c8274020c6053a32441ed43 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 20 Dec 2012 00:13:45 +0000 Subject: gensigs.bld now generates SignalList classes in addition to Signal classes. They're pretty nifty. --- src/tests/signal.cpp | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/tests/signal.cpp b/src/tests/signal.cpp index 8920461..93519fa 100644 --- a/src/tests/signal.cpp +++ b/src/tests/signal.cpp @@ -17,56 +17,16 @@ void PrintFancy( const Bu::String &s ) int Square( int a ) { + println("Square called"); return a*a; } int Double( int a ) { + println("Double called"); return a+a; } -template -class SignalList1 : public Bu::List > -{ - typedef Bu::List > MyType; -public: - SignalList1() - { - } - - using MyType::iterator; - using MyType::const_iterator; - - R operator()( P p1 ) - { - println("===Non-void um...non-specialization==="); - R tmp; - for( typename MyType::iterator i = MyType::begin(); i; i++ ) - tmp = (*i)( p1 ); - return tmp; - } -}; - -template -class SignalList1 : public Bu::List > -{ - typedef Bu::List > MyType; -public: - SignalList1() - { - } - - using MyType::iterator; - using MyType::const_iterator; - - void operator()( P p1 ) - { - println("===Void specialization==="); - for( typename MyType::iterator i = MyType::begin(); i; i++ ) - (*i)( p1 ); - } -}; - int main() { SignalList1 lPrints; -- cgit v1.2.3