#ifndef __ID_GENERATOR__ #define __ID_GENERATOR__ #include // 唯一ID生成器 class Independent_ID_Generator { protected: // 连续ID串 typedef struct { int begin; int end; } Continuous_ID_Section; std::vector continuous_id_list; public: // 获取ID int Request_ID(void); // 释放ID true-> success / false -> fail bool Release_ID(const int ID); }; #endif