Go to the source code of this file.
◆ _FLAG_FUNC
#define _FLAG_FUNC |
( |
| A, |
|
|
| a ) |
Value: ANN static inline int a##flag(const A a, const enum a##flag flag) { \
return (a->a##flag & flag) == flag; \
} \
static inline int safe_##a##flag(const A a, const enum a##flag flag) { \
return a ? ((a->a##flag & flag) == flag) : 0; \
}
Definition at line 33 of file flags.h.
33#define _FLAG_FUNC(A, a) \
34 ANN static inline int a##flag(const A a, const enum a##flag flag) { \
35 return (a->a##flag & flag) == flag; \
36 } \
37 static inline int safe_##a##flag(const A a, const enum a##flag flag) { \
38 return a ? ((a->a##flag & flag) == flag) : 0; \
39 }
◆ FLAG_FUNC
#define FLAG_FUNC |
( |
| A, |
|
|
| a ) |
Value: ANN static inline void set_##a##flag(A a, const enum a##flag flag) { \
a->a##flag |= flag; \
} \
static inline void unset_##a##flag(A a, const enum a##flag flag) { \
a->a##flag &= ~flag; \
} \
_FLAG_FUNC(A, a)
Definition at line 41 of file flags.h.
41#define FLAG_FUNC(A, a) \
42 ANN static inline void set_##a##flag(A a, const enum a##flag flag) { \
43 a->a##flag |= flag; \
44 } \
45 static inline void unset_##a##flag(A a, const enum a##flag flag) { \
46 a->a##flag &= ~flag; \
47 } \
48 _FLAG_FUNC(A, a)
◆ GET_FLAG
#define GET_FLAG |
( |
| a, |
|
|
| b ) |
Value:(((a)->flag & ae_flag_##b) == (ae_flag_##b))
Definition at line 16 of file flags.h.
◆ SAFE_FLAG
#define SAFE_FLAG |
( |
| a, |
|
|
| b ) |
Value:(a && ((a)->flag & (ae_flag_##b)) == (ae_flag_##b))
Definition at line 17 of file flags.h.
◆ SET_FLAG
#define SET_FLAG |
( |
| a, |
|
|
| b ) |
Value:(a)->flag |= (ae_flag_##b)
Definition at line 8 of file flags.h.
◆ UNSET_FLAG
#define UNSET_FLAG |
( |
| a, |
|
|
| b ) |
Value:((a)->flag &= ~(ae_flag_##b))
Definition at line 18 of file flags.h.
◆ __attribute__
Enumerator |
---|
ae_flag_none | |
ae_flag_static | |
ae_flag_private | |
ae_flag_global | |
ae_flag_const | |
ae_flag_late | |
ae_flag_abstract | |
ae_flag_final | |
ae_flag_protect | |
Definition at line 20 of file flags.h.