Changeset 2485 for code/branches/presentation/src/network/synchronisable
- Timestamp:
- Dec 16, 2008, 6:01:13 PM (16 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
-
code/branches/presentation/src/network/synchronisable/Synchronisable.cc
r2482 r2485 119 119 if (it != objectMap_.end()) 120 120 objectMap_.erase(it); 121 121 122 122 //HACK HACK HACK HACK HACK HACK 123 123 // this hack ensures that childs of this object also get destroyed … … 166 166 167 167 Identifier* id = ClassByID(header->classID); 168 if (!id) 169 { 170 COUT(0) << "Assertion failed: id" << std::endl; 171 COUT(0) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << std::endl; 172 abort(); 173 } 168 174 assert(id); 169 175 BaseObject* creator = 0; … … 253 259 254 260 /* void Synchronisable::registerVariable(void *var, int size, variableType t, uint8_t mode, NetworkCallbackBase *cb){ 255 assert( mode== direction::toclient || mode==direction::toserver || mode==direction::serverMaster || mode==direction::clientMaster);261 assert( mode==variableDirection::toclient || mode==variableDirection::toserver || mode==variableDirection::serverMaster || mode==variableDirection::clientMaster); 256 262 // create temporary synch.Var struct 257 263 synchronisableVariable *temp = new synchronisableVariable; … … 261 267 temp->type = t; 262 268 temp->callback = cb; 263 if( ( mode & direction::bidirectional ) )269 if( ( mode & variableDirection::bidirectional ) ) 264 270 { 265 271 if(t!=STRING) … … 286 292 #endif 287 293 }*/ 288 294 289 295 290 296 /** … … 444 450 objectMode_=mode; 445 451 } 446 452 447 453 448 454 } -
code/branches/presentation/src/network/synchronisable/Synchronisable.h
r2459 r2485 61 61 }; 62 62 } 63 63 64 64 namespace priority{ 65 65 enum prio{ … … 100 100 static uint32_t popDeletedObject(){ uint32_t i = deletedObjects_.front(); deletedObjects_.pop(); return i; } 101 101 102 inline uint32_t getObjectID() {return objectID;}103 inline unsigned int getCreatorID() {return creatorID;}104 inline uint32_t getClassID() {return classID;}105 inline unsigned int getPriority() { return objectFrequency_;}102 inline uint32_t getObjectID() const {return objectID;} 103 inline unsigned int getCreatorID() const {return creatorID;} 104 inline uint32_t getClassID() const {return classID;} 105 inline unsigned int getPriority() const { return objectFrequency_;} 106 106 107 107 protected: … … 134 134 static std::queue<uint32_t> deletedObjects_; 135 135 }; 136 136 137 137 template <class T> void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional) 138 138 { … … 158 158 // the variable has not been registered before 159 159 } 160 160 161 161 // ================= Specialisation declarations 162 162 template <> _NetworkExport void Synchronisable::registerVariable( const ColourValue& variable, uint8_t mode, NetworkCallbackBase* cb, bool bidirectional);
Note: See TracChangeset
for help on using the changeset viewer.