Changeset 3302 for code/branches/netp6/src/network/synchronisable
- Timestamp:
- Jul 18, 2009, 5:13:38 PM (15 years ago)
- Location:
- code/branches/netp6/src/network/synchronisable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/network/synchronisable/Synchronisable.cc
r3240 r3302 96 96 if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer())) 97 97 deletedObjects_.push(objectID); 98 // delete all Synchronisable Variables from syncList ( which are also in stringList )99 for(std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin(); it!=syncList.end(); it++)100 delete (*it);101 syncList.clear();102 stringList.clear();103 }98 } 99 // delete all Synchronisable Variables from syncList ( which are also in stringList ) 100 for(std::vector<SynchronisableVariableBase*>::iterator it = syncList.begin(); it!=syncList.end(); it++) 101 delete (*it); 102 syncList.clear(); 103 stringList.clear(); 104 104 std::map<uint32_t, Synchronisable*>::iterator it; 105 105 it = objectMap_.find(objectID); -
code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc
r3227 r3302 38 38 namespace orxonox{ 39 39 40 // template <> void Synchronisable::registerVariable( const std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)41 // {42 // if (bidirectional)43 // syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));44 // else45 // syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));46 // stringList.push_back(syncList.back());47 // }48 49 40 template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional) 50 41 { 42 SynchronisableVariableBase* sv; 51 43 if (bidirectional) 52 s yncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));44 sv = new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb); 53 45 else 54 syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb)); 55 stringList.push_back(syncList.back()); 46 sv = new SynchronisableVariable<const std::string>(variable, mode, cb); 47 syncList.push_back(sv); 48 stringList.push_back(sv); 56 49 } 57 50
Note: See TracChangeset
for help on using the changeset viewer.