2
3
4
5
6
7
8
9
10
11
12
13#ifndef GIMBAL_SETTINGS_H
14#define GIMBAL_SETTINGS_H
16#include "../meta/instances/gimbal_object.h"
17#include "../meta/signals/gimbal_signal.h"
20
21
22
23#define GBL_SETTINGS_TYPE (GBL_TYPEID(GblSettings))
24#define GBL_SETTINGS(self) (GBL_CAST(GblSettings, self))
25#define GBL_SETTINGS_CLASS(klass) (GBL_CLASS_CAST(GblSettings, klass))
26#define GBL_SETTINGS_GET_CLASS(self) (GBL_CLASSOF(GblSettings, self))
29#define GBL_SELF_TYPE GblSettings
34
35
43
44
45
46
47
48
49
50
51
52
56 GBL_RESULT (*pFnWrite)(
GBL_SELF,
const char* pKey, GblVariant* pValue);
57 GBL_RESULT (*pFnRead) (
GBL_SELF,
const char* pKey, GblVariant* pValue);
61
62
63
64
65
66
67
68
69
70
71
91 (added, (receiver, GBL_INSTANCE_TYPE), (key, GBL_STRING_TYPE)),
92 (removed, (receiver, GBL_INSTANCE_TYPE), (key, GBL_STRING_TYPE)),
93 (changed, (receiver, GBL_INSTANCE_TYPE), (key, GBL_STRING_TYPE)),
94 (saved, (receiver, GBL_INSTANCE_TYPE), (result, GBL_ENUM_TYPE)),
95 (loaded, (receiver, GBL_INSTANCE_TYPE), (result, GBL_ENUM_TYPE))
#define GBL_CLASS_CAST(cType, klass)
#define GBL_FORWARD_DECLARE_STRUCT(S)
#define GBL_TYPEID(instanceStruct)
#define GBL_INSTANCE_DERIVE(derivedInstance, baseInstance)
#define GBL_DECLARE_ENUM(E)
#define GBL_CLASS_DERIVE(...)
#define GBL_ENUM_TYPE
Type UUID of GblEnumClass.
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)
#define GBL_STRING_TYPE
Builtin ID for string GblVariant type.
#define GBL_BOOL_TYPE
Builtin ID for boolean GblVariant type.
#define GBL_PROPERTIES(object,...)
Declares a list of properties for the given object/instance structure.
GBL_SETTINGS_STATUS
Status code for GblSettings state (GblSettings::status)
@ GBL_SETTINGS_STATUS_ERROR_FORMAT
Format Error.
@ GBL_SETTINGS_STATUS_ERROR_FILE
File Error.
@ GBL_SETTINGS_STATUS_OK
OK.
#define GBL_SIGNALS(instanceStruct,...)
uint32_t GblEnum
Standard-sized enum type, 32-bits across platforms.
uint32_t GblFlags
Standard-sized flags type, 32-bits across platforms.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
uint16_t GblRefCount
Type able to hold a reference counter across the codebase.
const char GblStringRef
Reference-counted, const char*-compatible string type.
User-settings data management and persistence.