2
3
4
5
6
7
8
9
10
11
16#include "../../strings/gimbal_quark.h"
19
20
21
23#define GBL_ENUM_CLASS(klass) (GBL_CLASS_CAST
(GblEnum, klass))
27
28
29
30#define GBL_ENUM_ENTRY(enumValue, nick) { enumValue, #enumValue, nick }
31#define GBL_ENUM_ENTRY_LAST() { 0
, NULL, NULL }
34#define GBL_SELF_TYPE GblEnumClass
37
38
39
40
41
42#define GBL_ENUM(name, ...) GBL_ENUM_
(name, __VA_ARGS__)
54
55
56
57
58
59
60
69
70
71
72
80
81
82
83
91
92
93
94
104
105
106
107
121
122
123
131
132
133
146#define GBL_ENUM_(name, ...)
150 GBL_ENUM_REGISTER_
(name, __VA_ARGS__)
152#define GBL_ENUM_REGISTER_(name, ...)
158 static const GblEnumEntry entries_[] = {
168#define GBL_ENUM_DECL_(name, entry) GBL_ENUM_DECL__
(GBL_EVAL entry)
169#define GBL_ENUM_DECL__(...) GBL_ENUM_DECL___
(__VA_ARGS__)
170#define GBL_ENUM_DECL___(value, nick, num)
173#define GBL_ENUM_TABLE_(name, entry) GBL_ENUM_TABLE__
(GBL_EVAL entry)
174#define GBL_ENUM_TABLE__(...) GBL_ENUM_TABLE___
(__VA_ARGS__)
175#define GBL_ENUM_TABLE___(value, nick, num)
#define GBL_TYPEID(instanceStruct)
#define GBL_DECLARE_ENUM(E)
#define GBL_CLASS_DERIVE(...)
#define GBL_ENUM_ENTRY_LAST()
Utility GblEnumEntry initializer for end list designator.
#define GBL_ENUM_ENTRY(enumValue, nick)
Utility GblEnumEntry initializer, using the enumValue.
#define GBL_TUPLE_FOREACH(MACRO_, DATA_, TUPLE_)
#define GBL_INVALID_TYPE
GblType UUID of the invalid type.
uint32_t GblEnum
Standard-sized enum type, 32-bits across platforms.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
uintptr_t GblQuark
Uniquely identifiable interned string type.
GblEnum valueMin
Cached minimum value of the enum (used for validation)
GblEnum valueMax
Cached maximum value of the enum (used for validation)
uint16_t entryCount
Cached number of values in the entry table.
Attributes for a single value of an enumeration.
GblEnum value
Value of the enumeration.
const char * pName
String name of the enumeration value.
const char * pNick
Alternate name of the enumeration value.