00001 #ifndef UINT_ID_H 00002 #define UINT_ID_H 00003 #include <stdint.h> 00004 00005 class UIntID 00006 { 00007 unsigned int next_id; 00008 00009 public: 00010 UIntID() : next_id(0) {} 00011 00012 unsigned int Get() 00013 { 00014 if(next_id == UINT32_MAX) 00015 next_id = 0; 00016 else 00017 ++next_id; 00018 return next_id; 00019 } 00020 }; 00021 00022 #endif
1.5.8