Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2009, 5:13:38 PM (15 years ago)
Author:
scheusso
Message:

changed some debug output
removed some uneccessary "multi"threading
some enhancements in Connection

Location:
code/branches/netp6/src/network/synchronisable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp6/src/network/synchronisable/Synchronisable.cc

    r3240 r3302  
    9696      if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
    9797        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();
    104104    std::map<uint32_t, Synchronisable*>::iterator it;
    105105    it = objectMap_.find(objectID);
  • code/branches/netp6/src/network/synchronisable/SynchronisableSpecialisations.cc

    r3227 r3302  
    3838namespace orxonox{
    3939 
    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 //     else
    45 //       syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));
    46 //     stringList.push_back(syncList.back());
    47 //   }
    48  
    4940  template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
    5041  {
     42    SynchronisableVariableBase* sv;
    5143    if (bidirectional)
    52       syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));
     44      sv = new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb);
    5345    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);
    5649  }
    5750 
Note: See TracChangeset for help on using the changeset viewer.