Changeset 7327 for code/branches/doc/src/libraries/util/Serialise.h
- Timestamp:
- Sep 3, 2010, 12:19:53 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/util/Serialise.h
r7182 r7327 29 29 /** 30 30 @file 31 @ingroup Util 31 32 @brief Functions to serialise most of the types/classed used in Orxonox 32 33 */ … … 53 54 template <class T> inline bool checkEquality( const T& variable, uint8_t* mem ); 54 55 55 56 56 57 // =========== char* 57 58 58 59 inline uint32_t returnSize( char*& variable ) 59 60 { 60 61 return strlen(variable)+1; 61 62 } 62 63 63 64 inline void saveAndIncrease( char*& variable, uint8_t*& mem ) 64 65 { … … 66 67 mem += returnSize(variable); 67 68 } 68 69 69 70 inline void loadAndIncrease( char*& variable, uint8_t*& mem ) 70 71 { … … 76 77 mem += len; 77 78 } 78 79 79 80 inline bool checkEquality( char*& variable, uint8_t* mem ) 80 81 { 81 82 return strcmp(variable, (char*)mem)==0; 82 83 } 83 84 84 85 // =================== Template specialisation stuff ============= 85 86 … … 423 424 return memcmp(&temp, mem, sizeof(uint64_t))==0; 424 425 } 425 426 426 427 // =========== string 427 428
Note: See TracChangeset
for help on using the changeset viewer.