- Timestamp:
- Nov 5, 2008, 3:43:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Synchronisable.cc
r2133 r2143 251 251 * @param cb callback object that should get called, if the value of the variable changes 252 252 */ 253 void Synchronisable::registerVar (void *var, int size, variableType t, uint8_t mode, NetworkCallbackBase *cb){253 void Synchronisable::registerVariable(void *var, int size, variableType t, uint8_t mode, NetworkCallbackBase *cb){ 254 254 assert( mode==direction::toclient || mode==direction::toserver || mode==direction::serverMaster || mode==direction::clientMaster); 255 255 // create temporary synch.Var struct … … 285 285 #endif 286 286 } 287 288 void Synchronisable::unregisterVariable(void *var){ 289 std::list<synchronisableVariable *>::iterator it = syncList->begin(); 290 while(it!=syncList->end()){ 291 if( (*it)->var == var ){ 292 delete *it; 293 syncList->erase(it); 294 return; 295 } 296 else 297 it++; 298 } 299 assert(0); //if we reach this point something went wrong 300 } 301 287 302 288 303 /**
Note: See TracChangeset
for help on using the changeset viewer.