Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 18, 2009, 6:23:31 PM (15 years ago)
Author:
rgrieder
Message:

Merged netp6 branch back to the trunk.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/network/synchronisable/SynchronisableSpecialisations.cc

    r3214 r3304  
    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 
     
    7366    registerVariable(variable.y, mode, cb, bidirectional);
    7467  }
    75 //   template <> void Synchronisable::registerVariable( Vector2& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
    76 //   {
    77 //     registerVariable( (const ColourValue&)variable, mode, cb, bidirectional);
    78 //   }
    7968 
    8069  template <> void Synchronisable::registerVariable( const Vector3& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional)
Note: See TracChangeset for help on using the changeset viewer.