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

22 lines
605 B

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string.h>
  4. namespace iflytop {
  5. class ZEnum {
  6. public:
  7. const int val;
  8. const char* name;
  9. const char* chName;
  10. ZEnum(int val, const char* name, const char* chName) : val(val), name(name), chName(chName) {}
  11. bool isEq(int val) const { return this->val == val; }
  12. bool isEq(const ZEnum& role) const { return this->val == role.val; }
  13. bool isEqByChName(const char* chName) { return strcmp(this->chName, chName) == 0; }
  14. // ʵ�ֿ������캯��
  15. ZEnum(const ZEnum& role) : val(role.val), name(role.name), chName(role.chName) {}
  16. };
  17. } // namespace iflytop