From f72c6e4b97afeb69d9ea4d743c0c302d647ea424 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 16 Dec 2009 20:10:58 +0000 Subject: The new signal/slots system is in place, and works from 0-5 parameters right now, I'll probably add more later on... I've also started on the replacement for ParamProc, OptParser. It should do everything that ParamProc did, only with less code, and much better. --- src/tests/optparser.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/tests/optparser.cpp (limited to 'src/tests/optparser.cpp') diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp new file mode 100644 index 0000000..9168af8 --- /dev/null +++ b/src/tests/optparser.cpp @@ -0,0 +1,27 @@ +#include +#include +using namespace Bu; + +class Opts : public Bu::OptParser +{ +public: + Opts() : + iBob( 542 ) + { + callback( this, &Opts::cb ); + } + + int cb( int argc, char *argv[] ) + { + sio << "Hey, cb was called, here's a class var: " << iBob << sio.nl; + return 5; + } + + int iBob; +}; + +int main( int argc, char *argv[] ) +{ + Opts o; +} + -- cgit v1.2.3