Changeset 7631 in orxonox.OLD for branches/network/src/subprojects
- Timestamp:
- May 17, 2006, 8:28:23 AM (19 years ago)
- Location:
- branches/network/src/subprojects/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/subprojects/network/network_unit_test.cc
r7617 r7631 259 259 260 260 SimpleSync* ss = new SimpleSync("Server"); 261 ss->setSynchronized( true ); 261 262 262 263 … … 292 293 netMan->establishConnection("localhost", 9999); 293 294 294 SimpleSync* ss = new SimpleSync("SimpleSync"); 295 netMan->connectSynchronizeable( *ss ); 296 295 // SimpleSync* ss = new SimpleSync("SimpleSync"); 296 // ss->setSynchronized( true ); 297 // netMan->connectSynchronizeable( *ss ); 298 299 SimpleSync * ss = NULL; 300 297 301 for(;;) 298 302 { 299 303 netMan->synchronize(); 304 ss = dynamic_cast<SimpleSync*>(ClassList::getObject( "Server", CL_SIMPLE_SYNC ) ); 300 305 SDL_Delay(1000); 301 ss->debug(); 306 if (ss) 307 ss->debug(); 302 308 } 303 309 -
branches/network/src/subprojects/network/simple_sync.cc
r7617 r7631 22 22 #include "simple_sync.h" 23 23 24 #include "class_id.h" 25 #include "fast_factory.h" 26 #include "lib/util/loading/factory.h" 27 24 28 #include "debug.h" 29 30 CREATE_FACTORY(SimpleSync, CL_SIMPLE_SYNC); 25 31 26 32 … … 31 37 { 32 38 setName( name ); 39 this->setClassID( CL_SIMPLE_SYNC, "SimpleSync" ); 33 40 in = 0; 34 41 out = 1; … … 49 56 } 50 57 58 SimpleSync::SimpleSync( const TiXmlElement * root ) 59 { 60 setName( "" ); 61 this->setClassID( CL_SIMPLE_SYNC, "SimpleSync" ); 62 in = 0; 63 out = 1; 64 id = this->registerVarId( new SynchronizeableInt( &in, &out, "var", PERMISSION_ALL ) ); 65 } 51 66 52 67 68 -
branches/network/src/subprojects/network/simple_sync.h
r7617 r7631 14 14 public: 15 15 SimpleSync( std::string name); 16 SimpleSync(const TiXmlElement* root = NULL); 16 17 virtual ~SimpleSync(); 17 18
Note: See TracChangeset
for help on using the changeset viewer.