Changeset 2749 for code/branches/network/src/network/packet/ClassID.h
- Timestamp:
- Mar 5, 2009, 1:54:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/packet/ClassID.h
r2737 r2749 38 38 namespace packet { 39 39 40 #define PACKET_FLAGS_CLASSID ENET_PACKET_FLAG_RELIABLE41 #define _PACKETID 042 #define _CLASSID _PACKETID + sizeof(ENUM::Type)43 #define _CLASSNAMELENGTH _CLASSID + sizeof(uint32_t)44 #define _CLASSNAME _CLASSNAMELENGTH + sizeof(classNameLength_)45 40 46 41 /** … … 50 45 { 51 46 public: 52 ClassID( uint32_t classID, std::string className);47 ClassID( ); 53 48 ClassID( uint8_t* data, unsigned int clientID ); 54 49 ~ClassID(); 55 50 56 inline uint32_t getSize() const{ return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t) + classNameLength_; }51 uint32_t getSize() const; 57 52 bool process(); 58 53 59 uint32_t getClassID();60 uint32_t getClassNameLength(){ return classNameLength_; }61 const char *getClassName(){ return (const char*)(data_+_CLASSNAME); }54 // uint32_t getClassID(); 55 // uint32_t getClassNameLength(){ return classNameLength_; } 56 // const char *getClassName(){ return (const char*)(data_+_CLASSNAME); } 62 57 private: 63 uint32_t classNameLength_; 58 // uint32_t classNameLength_; 59 // static bool alreadySetOneClassID_; 64 60 }; 65 61
Note: See TracChangeset
for help on using the changeset viewer.