|
From: stephan b. <sg...@us...> - 2004-06-01 03:31:07
|
Update of /cvsroot/qub/eshell/client/gcom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11600/client/gcom Modified Files: main.cpp Log Message: mass commit, so i can work from the office. Index: main.cpp =================================================================== RCS file: /cvsroot/qub/eshell/client/gcom/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- main.cpp 31 May 2004 15:19:07 -0000 1.3 +++ main.cpp 1 Jun 2004 03:30:57 -0000 1.4 @@ -181,6 +181,23 @@ return 0; } +void setup_TheGCom() +{ + gcom::basic_gcom & gc = *TheGCom; + gc.name( "fred" ); + gc.props().set( "coord", Coord2D( 10, 27 ) ); + gc.props().set( "sumdumproperty", "sumdumvalue" ); + gcom::basic_gcom * gch = new gcom::dummy_gcom(); + gch->name( "baby" ); + gch->props().set( "got_milk", 1 ); + gc.children().push_back( gch ); +// test_gcom_handler th; +// th.listen_to( TheGCom ); +// th.listen_to( gch ); +// test_property_handler tph; +// tph.listen_to( &(TheGCom->props()) ); +// tph.listen_to( &(gch->props()) ); +} int main( int argc, char **argv ) { eshell::init( argc, argv ); @@ -188,28 +205,12 @@ CERR << "Type 'event' to run the event test.\n"; - //////////////////////////////////////////////////////////// - // event test setup... + setup_TheGCom(); + eshell::map_commander( "event", ::test_event ); eshell::map_commander( "gset", ::test_gset ); eshell::map_commander( "gunset", ::test_gunset ); eshell::map_commander( "dump", ::dump_TheGCom ); - gcom::basic_gcom & gc = *TheGCom; - gc.name( "fred" ); - gc.props().set( "coord", Coord2D( 10, 27 ) ); - gc.props().set( "sumdumproperty", "sumdumvalue" ); - gcom::basic_gcom * gch = new gcom::dummy_gcom(); - gch->name( "baby" ); - gch->props().set( "got_milk", 1 ); - gc.children().push_back( gch ); - test_gcom_handler th; - th.listen_to( TheGCom ); - th.listen_to( gch ); - test_property_handler tph; - tph.listen_to( &(TheGCom->props()) ); - tph.listen_to( &(gch->props()) ); - // end event test setup - //////////////////////////////////////////////////////////// eshell::map_commander( "cgme", ::test_cgme ); eshell::map_commander( "hex", ::test_hexagon_key ); |