2
3
4
5
6
7
8
13#include "../../strings/gimbal_quark.h"
16
17
18
19#define GBL_FLAGS_TYPE (GblFlags_type())
20#define GBL_FLAGS_CLASS(klass) (GBL_CLASS_CAST
(GblFlags, klass))
24
25
26
27#define GBL_FLAGS_ENTRY(flagsValue, nick) { flagsValue, #flagsValue, nick }
28#define GBL_FLAGS_ENTRY_LAST() { 0
, NULL, NULL }
31#define GBL_SELF_TYPE GblFlagsClass
34
35
36
37
38
39#define GBL_FLAGS(name, ...) GBL_FLAGS_
(name, __VA_ARGS__)
51
52
53
54
55
56
57
65
66
67
68
76
77
78
79
87
88
89
90
106
107
108
109
123
124
125
134
135
136
152#define GBL_FLAGS_(name, ...)
156 GBL_FLAGS_REGISTER_
(name, __VA_ARGS__)
158#define GBL_FLAGS_REGISTER_(name, ...)
164 static const GblFlagEntry entries_[] = {
174#define GBL_FLAGS_DECL_(name, entry) GBL_FLAGS_DECL__
(GBL_EVAL entry)
175#define GBL_FLAGS_DECL__(...) GBL_FLAGS_DECL___
(__VA_ARGS__)
176#define GBL_FLAGS_DECL___(value, nick, num)
179#define GBL_FLAGS_TABLE_(name, entry) GBL_FLAGS_TABLE__
(GBL_EVAL entry)
180#define GBL_FLAGS_TABLE__(...) GBL_FLAGS_TABLE___
(__VA_ARGS__)
181#define GBL_FLAGS_TABLE___(value, nick, num)
#define GBL_CLASS_DERIVE(...)
#define GBL_DECLARE_FLAGS(F)
#define GBL_FLAGS_ENTRY_LAST()
#define GBL_FLAGS_ENTRY(flagsValue, nick)
#define GBL_TUPLE_FOREACH(MACRO_, DATA_, TUPLE_)
#define GBL_INVALID_TYPE
GblType UUID of the invalid type.
uint32_t GblFlags
Standard-sized flags type, 32-bits across platforms.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
uintptr_t GblQuark
Uniquely identifiable interned string type.
Attributes for a single bit flag value within a group of GblFlag values.
const char * pName
String name of the flag value.
GblFlags value
Value of the flag.
const char * pNick
Alternate name of the flag value.
GblFlags valueMask
Mask of all bits which can be set within the value.
uint16_t entryCount
Cached number of values in the entry table.