- 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.h
r2307 r2309 53 53 namespace orxonox 54 54 { 55 static const u nsigned int OBJECTID_UNKNOWN = (unsigned int)-1;55 static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); 56 56 57 57 namespace objectDirection{ … … 86 86 87 87 static Synchronisable *fabricate(uint8_t*& mem, uint8_t mode=0x0); 88 static bool deleteObject(u nsigned int objectID);89 static Synchronisable *getSynchronisable(u nsigned int objectID);88 static bool deleteObject(uint32_t objectID); 89 static Synchronisable *getSynchronisable(uint32_t objectID); 90 90 static unsigned int getNumberOfDeletedObject(){ return deletedObjects_.size(); } 91 static u nsigned int popDeletedObject(){ unsigned int i = deletedObjects_.front(); deletedObjects_.pop(); return i; }91 static uint32_t popDeletedObject(){ uint32_t i = deletedObjects_.front(); deletedObjects_.pop(); return i; } 92 92 93 inline u nsigned int getObjectID(){return objectID;}94 inline u nsigned int getClassID(){return classID;}93 inline uint32_t getObjectID(){return objectID;} 94 inline uint32_t getClassID(){return classID;} 95 95 protected: 96 96 Synchronisable(BaseObject* creator); … … 103 103 104 104 private: 105 bool getData(uint8_t*& men, unsigned int id, uint8_t mode=0x0);106 uint32_t getSize( unsigned int id, uint8_t mode=0x0);105 bool getData(uint8_t*& men, int32_t id, uint8_t mode=0x0); 106 uint32_t getSize(int32_t id, uint8_t mode=0x0); 107 107 bool updateData(uint8_t*& mem, uint8_t mode=0x0, bool forceCallback=false); 108 108 bool isMyData(uint8_t* mem); 109 bool doSelection( unsigned int id);110 bool doSync( unsigned int id, uint8_t mode=0x0);109 bool doSelection(int32_t id); 110 bool doSync(int32_t id, uint8_t mode=0x0); 111 111 112 u nsigned int objectID;113 u nsigned int creatorID;114 u nsigned int classID;112 uint32_t objectID; 113 uint32_t creatorID; 114 uint32_t classID; 115 115 116 116 std::list<SynchronisableVariableBase*> syncList; … … 119 119 unsigned int objectFrequency_; 120 120 int objectMode_; 121 static std::map<u nsigned int, Synchronisable *> objectMap_;122 static std::queue<u nsigned int> deletedObjects_;121 static std::map<uint32_t, Synchronisable *> objectMap_; 122 static std::queue<uint32_t> deletedObjects_; 123 123 }; 124 124
Note: See TracChangeset
for help on using the changeset viewer.