Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2009, 10:28:25 AM (15 years ago)
Author:
scheusso
Message:

reduced overhead/load of Synchronisable::getSize quite a lot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp/src/network/synchronisable/SynchronisableSpecialisations.cc

    r2662 r2822  
    2929
    3030#include "network/synchronisable/Synchronisable.h"
     31#include <string>
    3132
    3233// ================ template spezialisation
     
    3435 
    3536namespace orxonox{
     37 
     38//   template <> void Synchronisable::registerVariable( const std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
     39//   {
     40//     if (bidirectional)
     41//       syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));
     42//     else
     43//       syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));
     44//     stringList.push_back(syncList.back());
     45//   }
     46 
     47  template <> void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
     48  {
     49    if (bidirectional)
     50      syncList.push_back(new SynchronisableVariableBidirectional<const std::string>(variable, mode, cb));
     51    else
     52      syncList.push_back(new SynchronisableVariable<const std::string>(variable, mode, cb));
     53    stringList.push_back(syncList.back());
     54  }
    3655 
    3756  template <> void Synchronisable::registerVariable( const ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
Note: See TracChangeset for help on using the changeset viewer.