You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

uniqueid.h 341 B

8 years ago
123456789101112131415161718192021
  1. #ifndef UNIQUEID_H
  2. #define UNIQUEID_H
  3. #include <atomic>
  4. using namespace std;
  5. typedef unsigned long long IdType;
  6. /**
  7. * @brief The UniqueId class 返回大于0小于MAX_ULONG的数,多线程安全,自动归0
  8. */
  9. class UniqueId
  10. {
  11. public:
  12. UniqueId();
  13. public:
  14. IdType get();
  15. private:
  16. atomic_ullong mId;
  17. };
  18. #endif // UNIQUEID_H

mac下的“飞秋”大多数只是飞鸽传书协议,而且未发现令人满意的开源项目,所以基于c++与qt实现了基础的飞秋协议。

Contributors (1)