Changeset 7127 for code/branches/presentation3/src/libraries/util
- Timestamp:
- Jun 9, 2010, 9:32:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/libraries/util/Serialise.h
r7105 r7127 636 636 return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem ); 637 637 } 638 638 639 639 // =========== std::set 640 640 641 641 template <class T> inline uint32_t returnSize( const std::set<T>& variable ) 642 642 { 643 643 uint32_t tempsize = sizeof(uint32_t); // for the number of entries 644 644 for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it) 645 tempsize += returnSize( *it ); 646 return tempsize; 647 } 648 645 tempsize += returnSize( *it ); 646 return tempsize; 647 } 648 649 649 template <class T> inline void saveAndIncrease( const std::set<T>& variable, uint8_t*& mem ) 650 650 { … … 654 654 saveAndIncrease( *it, mem ); 655 655 } 656 656 657 657 template <class T> inline void loadAndIncrease( const std::set<T>& variable, uint8_t*& mem ) 658 658 { … … 675 675 } 676 676 } 677 677 678 678 template <class T> inline bool checkEquality( const std::set<T>& variable, uint8_t* mem ) 679 679 {
Note: See TracChangeset
for help on using the changeset viewer.