- Timestamp:
- Dec 2, 2008, 9:10:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network64/src/network/synchronisable/Synchronisable.cc
r2307 r2309 55 55 56 56 57 std::map<u nsigned int, Synchronisable *> Synchronisable::objectMap_;58 std::queue<u nsigned int> Synchronisable::deletedObjects_;57 std::map<uint32_t, Synchronisable *> Synchronisable::objectMap_; 58 std::queue<uint32_t> Synchronisable::deletedObjects_; 59 59 60 60 uint8_t Synchronisable::state_=0x1; // detemines wheter we are server (default) or client … … 77 77 else 78 78 objectID=OBJECTID_UNKNOWN; 79 classID = (unsigned int)-1;79 classID = static_cast<uint32_t>(-1); 80 80 81 81 … … 122 122 // objectMap_.erase(objectID); 123 123 } 124 std::map<u nsigned int, Synchronisable*>::iterator it;124 std::map<uint32_t, Synchronisable*>::iterator it; 125 125 it = objectMap_.find(objectID); 126 126 if (it != objectMap_.end()) … … 199 199 * @return true/false 200 200 */ 201 bool Synchronisable::deleteObject(u nsigned int objectID){201 bool Synchronisable::deleteObject(uint32_t objectID){ 202 202 // assert(getSynchronisable(objectID)); 203 203 if(!getSynchronisable(objectID)) … … 218 218 * @return pointer to the Synchronisable with the objectID 219 219 */ 220 Synchronisable* Synchronisable::getSynchronisable(u nsigned int objectID){221 std::map<u nsigned int, Synchronisable*>::iterator it1;220 Synchronisable* Synchronisable::getSynchronisable(uint32_t objectID){ 221 std::map<uint32_t, Synchronisable*>::iterator it1; 222 222 it1 = objectMap_.find(objectID); 223 223 if (it1 != objectMap_.end()) … … 295 295 * @return true: if !doSync or if everything was successfully saved 296 296 */ 297 bool Synchronisable::getData(uint8_t*& mem, unsigned int id, uint8_t mode){297 bool Synchronisable::getData(uint8_t*& mem, int32_t id, uint8_t mode){ 298 298 if(mode==0x0) 299 299 mode=state_; … … 302 302 return true; 303 303 //std::cout << "inside getData" << std::endl; 304 u nsigned int tempsize = 0;304 uint32_t tempsize = 0; 305 305 if(classID==0) 306 306 COUT(3) << "classid 0 " << this->getIdentifier()->getName() << std::endl; 307 307 308 if (this->classID == (unsigned int)-1)308 if (this->classID == static_cast<uint32_t>(-1)) 309 309 this->classID = this->getIdentifier()->getNetworkID(); 310 310 … … 312 312 // this->classID=this->getIdentifier()->getNetworkID(); // TODO: correct this 313 313 std::list<SynchronisableVariableBase*>::iterator i; 314 u nsigned int size;314 uint32_t size; 315 315 size=getSize(id, mode); 316 316 … … 384 384 * @return amount of bytes 385 385 */ 386 uint32_t Synchronisable::getSize( unsigned int id, uint8_t mode){386 uint32_t Synchronisable::getSize(int32_t id, uint8_t mode){ 387 387 int tsize=sizeof(synchronisableHeader); 388 388 if(mode==0x0) … … 402 402 * @return true/false 403 403 */ 404 bool Synchronisable::doSync( unsigned int id, uint8_t mode){404 bool Synchronisable::doSync(int32_t id, uint8_t mode){ 405 405 if(mode==0x0) 406 406 mode=state_; … … 408 408 } 409 409 410 bool Synchronisable::doSelection( unsigned int id){410 bool Synchronisable::doSelection(int32_t id){ 411 411 return true; //TODO: change this 412 412 //return ( id==0 || id%objectFrequency_==objectID%objectFrequency_ ) && ((objectMode_&state_)!=0);
Note: See TracChangeset
for help on using the changeset viewer.