Changeset 2168 for code/branches/objecthierarchy/src/network
- Timestamp:
- Nov 9, 2008, 7:11:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Synchronisable.cc
r2156 r2168 79 79 classID = (unsigned int)-1; 80 80 syncList = new std::list<synchronisableVariable *>; 81 82 81 82 83 83 #ifndef NDEBUG 84 84 ObjectList<Synchronisable>::iterator it; … … 173 173 return 0; 174 174 } 175 175 176 176 COUT(4) << "fabricating object with id: " << header->objectID << std::endl; 177 177 … … 240 240 if (it1 != objectMap_.end()) 241 241 return it1->second; 242 242 243 243 ObjectList<Synchronisable>::iterator it; 244 244 for(it = ObjectList<Synchronisable>::begin(); it; ++it){ … … 295 295 #endif 296 296 } 297 297 298 298 void Synchronisable::unregisterVariable(void *var){ 299 299 std::list<synchronisableVariable *>::iterator it = syncList->begin(); … … 311 311 // the variable has not been registered before 312 312 } 313 313 314 314 315 315 /** … … 366 366 continue; // this variable should only be received 367 367 } 368 368 369 369 // =========== start bidirectional stuff ============= 370 370 // if the variable gets synchronised bidirectional, then add the reference to the bytestream … … 397 397 } 398 398 // ================== end bidirectional stuff 399 399 400 400 switch((*i)->type){ 401 401 case DATA: … … 461 461 bool callback=false; 462 462 bool master=false; 463 463 464 464 if( ( (*i)->mode & direction::bidirectional ) == direction::bidirectional ) 465 465 { … … 505 505 mem += sizeof((*i)->varReference); 506 506 } 507 507 508 508 switch((*i)->type){ 509 509 case DATA: … … 525 525 (*i)->size = *(size_t *)mem; 526 526 mem += sizeof(size_t); 527 527 528 528 if( (*i)->callback) // check whether this string changed 529 529 if( *static_cast<std::string*>((*i)->var) != std::string((char *)mem) ) … … 535 535 *static_cast<std::string*>((*i)->varBuffer)=*static_cast<std::string*>( (void*)(mem+sizeof(size_t)) ); 536 536 } 537 537 538 538 *((std::string *)((*i)->var)) = std::string((const char*)mem); 539 539 COUT(5) << "synchronisable: char: " << (const char*)mem << " string: " << std::string((const char*)mem) << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.