- Timestamp:
- Jun 3, 2010, 2:24:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/libraries/network/synchronisable/Synchronisable.h
r6417 r7105 37 37 #include <map> 38 38 #include <queue> 39 #include <set> 39 40 40 41 #include "util/mbool.h" … … 138 139 Synchronisable(BaseObject* creator); 139 140 template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false); 141 template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false); 140 142 141 143 void setPriority(unsigned int freq){ objectFrequency_ = freq; } … … 181 183 } 182 184 } 185 186 template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional) 187 { 188 SynchronisableVariableBase* sv; 189 if (bidirectional) 190 sv = new SynchronisableVariableBidirectional<std::set<T> >(variable, mode, cb); 191 else 192 sv = new SynchronisableVariable<std::set<T> >(variable, mode, cb); 193 syncList.push_back(sv); 194 stringList.push_back(sv); 195 } 183 196 184 197 template <> _NetworkExport void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional); 198 // template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T> >( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional); 185 199 186 200
Note: See TracChangeset
for help on using the changeset viewer.