2
3
4
5
6
7
8
9
10
11
12
13#ifndef GIMBAL_BIT_STRUCT_H
14#define GIMBAL_BIT_STRUCT_H
17#include "../ifaces/gimbal_itable_variant.h"
19#define GBL_BIT_STRUCT_TYPE (GBL_TYPEID(GblBitStruct))
20#define GBL_BIT_STRUCT_CLASS(klass) (GBL_CLASS_CAST(GblBitStruct, klass))
22#define GBL_BIT_STRUCT_ENTRY(name, mask, type) { name, mask, type }
25#define GBL_SELF_TYPE GblBitStructClass
29typedef uint64_t GblBitStruct;
40 GBL_RESULT (*pFnCheckFieldValue)(
GBL_CSELF, size_t fieldIndex,
const GblVariant* pValue);
48
49
50
51
59
60
61
62
69
70
71
72
81GBL_EXPORT GblBool GblBitStructClass_checkValueForIndex (GBL_CSELF, size_t index, GblVariant* pValue) GBL_NOEXCEPT;
82GBL_EXPORT GblBool GblBitStructClass_checkValueForName (GBL_CSELF,
const char* pName, GblVariant* pValue) GBL_NOEXCEPT;
83GBL_EXPORT GblBool GblBitStructClass_checkValueForNameQuark (GBL_CSELF, GblQuark quark, GblVariant* pValue) GBL_NOEXCEPT;
84GBL_EXPORT GblBool GblBitStructClass_checkValueForBitmask (GBL_CSELF, GblBitmask msk, GblVariant* pValue) GBL_NOEXCEPT;
86GBL_EXPORT GblBool GblBitStructClass_checkValue (GBL_CSELF, uint64_t value) GBL_NOEXCEPT;
88GBL_EXPORT GblBool GblBitStruct_checkValue(GblBitStruct value, GblType type);
90GBL_EXPORT GBL_RESULT GblBitStruct_field(GblBitStruct value, GblType type,
const char* pName, ...);
91GBL_EXPORT GBL_RESULT GblBitStruct_mask(GblBitStruct value, GblType type, GblBitmask mask, ...);
92GBL_EXPORT GBL_RESULT GblBitStruct_index(GblBitStruct value, GblType type, size_t index, ...);
94GBL_EXPORT GBL_RESULT GblBitStruct_fields(GblBitStruct value, GblType type, ...);
95GBL_EXPORT GBL_RESULT GblBitStruct_masks(GblBitStruct value, GblType type, ...);
96GBL_EXPORT GBL_RESULT GblBitStruct_indices(GblBitStruct value, GblType type, ...);
98GBL_EXPORT GBL_RESULT GblBitStruct_setField(GblBitStruct* pValue, GblType type,
const char* pName, ...);
99GBL_EXPORT GBL_RESULT GblBitStruct_setMask(GblBitStruct* pValue, GblType type, GblBitmask mask, ...);
100GBL_EXPORT GBL_RESULT GblBitStruct_setIndex(GblBitStruct* pValue, GblType type, size_t index, ...);
102GBL_EXPORT GBL_RESULT GblBitStruct_setFields(GblBitStruct* pValue, GblType type,
const char* pName, ...);
103GBL_EXPORT GBL_RESULT GblBitStruct_setMasks(GblBitStruct* pValue, GblType type, GblBitmask mask, ...);
104GBL_EXPORT GBL_RESULT GblBitStruct_setIndices(GblBitStruct* pValue, GblType type, size_t index, ...);
107GBL_EXPORT GBL_RESULT GblBitStruct_next(GblBitStruct value, GblType type, GblVariant* pkey, GblVariant* pValue);
#define GBL_CLASS_CAST(cType, klass)
#define GBL_TYPEID(instanceStruct)
#define GBL_CLASS_DERIVE(...)
#define GBL_DECLARE_TYPE(instanceStruct)
#define GBL_INVALID_TYPE
GblType UUID of the invalid type.
uintptr_t GblQuark
Uniquely identifiable interned string type.
Contains meta data for a single field of a GblBitStruct.
GblType valueType
Field value.
const char * pName
Field name.
GblBitmask mask
Field mask.