Changeset 2533 for code/branches/bugger/src/network/synchronisable
- Timestamp:
- Dec 23, 2008, 11:34:35 PM (17 years ago)
- Location:
- code/branches/bugger
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bugger
- Property svn:mergeinfo changed
/code/branches/lodfinal (added) merged: 2372,2380,2388,2394-2395,2402,2411
- Property svn:mergeinfo changed
-
code/branches/bugger/src/network/synchronisable/NetworkCallbackManager.cc
- Property svn:eol-style set to native
-
code/branches/bugger/src/network/synchronisable/NetworkCallbackManager.h
- Property svn:eol-style set to native
-
code/branches/bugger/src/network/synchronisable/Synchronisable.cc
r2531 r2533 66 66 RegisterRootObject(Synchronisable); 67 67 static uint32_t idCounter=0; 68 objectFrequency_=1;69 68 objectMode_=0x1; // by default do not send data to server 70 69 if ( !Host::running() || ( Host::running() && Host::isServer() ) ) … … 78 77 classID = static_cast<uint32_t>(-1); 79 78 80 81 //#ifndef NDEBUG 82 // ObjectList<Synchronisable>::iterator it; 83 // for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){ 84 // if(!(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0))) 85 // { 86 // COUT(1) << "Assertion failed: *it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)" << std::endl; 87 // COUT(1) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << std::endl; 88 // abort(); 89 // } 90 // } 91 //#endif 79 // set standard priority 80 this->setPriority( priority::normal ); 81 82 83 // get creator id 84 #ifndef NDEBUG 85 ObjectList<Synchronisable>::iterator it; 86 for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){ 87 if( it->getObjectID()==this->objectID ) 88 if(!(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0))){ 89 COUT(1) << "Assertion failed: *it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)" << std::endl; 90 COUT(1) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << std::endl; 91 abort(); 92 } 93 } 94 #endif 92 95 93 96 this->creatorID = OBJECTID_UNKNOWN; … … 177 180 { 178 181 mem += header->size; //.TODO: this suckz.... remove size from header 182 assert(0); 179 183 return 0; 180 184 } … … 360 364 //assert( (mode ^ objectMode_) != 0); 361 365 if(syncList.empty()){ 366 assert(0); 362 367 COUT(4) << "Synchronisable::updateData syncList is empty" << std::endl; 363 368 return false; -
code/branches/bugger/src/network/synchronisable/Synchronisable.h
r2531 r2533 61 61 }; 62 62 } 63 64 namespace priority{ 65 enum prio{ 66 very_high = -100, 67 high = -15, 68 normal = 0, 69 low = 15, 70 very_low = 100 71 }; 72 } 63 73 64 74 struct _NetworkExport synchronisableHeader{ … … 101 111 template <class T> void unregisterVariable(T& var); 102 112 void setObjectMode(uint8_t mode); 103 void set ObjectPriority(unsigned int freq){ objectFrequency_ = freq; }113 void setPriority(unsigned int freq){ objectFrequency_ = freq; } 104 114 105 115
Note: See TracChangeset
for help on using the changeset viewer.