[complement-svn] SF.net SVN: complement: [1746] trunk/complement/explore/lib/janus/samples/ point1/
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-09-26 10:58:45
|
Revision: 1746 http://complement.svn.sourceforge.net/complement/?rev=1746&view=rev Author: complement Date: 2007-09-26 03:58:43 -0700 (Wed, 26 Sep 2007) Log Message: ----------- use cin for input; send message to group Modified Paths: -------------- trunk/complement/explore/lib/janus/samples/point1/point1.cc Modified: trunk/complement/explore/lib/janus/samples/point1/point1.cc =================================================================== --- trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-09-25 14:28:38 UTC (rev 1745) +++ trunk/complement/explore/lib/janus/samples/point1/point1.cc 2007-09-26 10:58:43 UTC (rev 1746) @@ -7,10 +7,12 @@ #include <mt/xmt.h> #include <iostream> +#include <string> using namespace janus; using namespace std; using namespace xmt; +using namespace stem; #define VS_LINE 0x1300 @@ -63,7 +65,7 @@ void YaSample::vs_line( const stem::Event& ev ) { - cerr << "Line here" << endl; + cerr << "Line here: '" << ev.value() << "'" << endl; } DEFINE_RESPONSE_TABLE( YaSample ) @@ -77,11 +79,26 @@ YaSample sample; - condition cnd; + sample.JoinGroup( janus::vs_base::first_user_group ); - cnd.set( false ); + Event ev( VS_LINE ); + ev.dest( janus::vs_base::first_user_group ); - cnd.wait(); + string line; + while ( cin.good() ) { + cin >> line; + if ( !cin.fail() ) { + ev.value() = line; + sample.JaSend( ev ); + } + } + + // condition cnd; + + // cnd.set( false ); + + // cnd.wait(); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |