CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
settings.h
Go to the documentation of this file.
1
6
7#pragma once
8
10#include <cx/stype/stconvert.h>
11#include <cx/stype/stvar.h>
12
13typedef struct VFS VFS;
14
100
110
116
135SSDNode* setsOpen(VFS* vfs, strref path, int64 flush_interval);
136
144bool setsClose(SSDNode** psets);
145
154bool setsFlush(SSDNode* sets);
155
163void setsSetDirty(SSDNode* sets);
164
166
172
205bool setsBind(SSDNode* sets, SetsBindSpec* bindings, void* base);
206
213void setsUnbindAll(SSDNode* sets);
214
222void setsCheckBound(SSDNode* sets);
223
235bool setsImport(SSDNode* sets, SetsBindSpec* bindings, void* base);
236
248bool setsExport(SSDNode* sets, SetsBindSpec* bindings, void* base);
249
251
259
279#define setsGetSub(sets, path) ssdSubtree(sets, path, SSD_Create_Hashtable)
280
301#define setsGet(sets, path, type, out, def) ssdCopyOutD(sets, path, type, out, def)
302
320#define setsSet(sets, path, type, val) ssdSet(sets, path, true, stvar(type, val))
321
335#define setsRemove(sets, path) ssdRemove(sets, path)
336
338
bool setsImport(SSDNode *sets, SetsBindSpec *bindings, void *base)
void setsCheckBound(SSDNode *sets)
void setsUnbindAll(SSDNode *sets)
bool setsBind(SSDNode *sets, SetsBindSpec *bindings, void *base)
bool setsExport(SSDNode *sets, SetsBindSpec *bindings, void *base)
bool setsClose(SSDNode **psets)
SSDNode * setsOpen(VFS *vfs, strref path, int64 flush_interval)
bool setsFlush(SSDNode *sets)
void setsSetDirty(SSDNode *sets)
#define stvar(typen, val)
Definition stvar.h:153
Semi-Structured Data (SSD) tree public API.
intptr offset
Byte offset of variable from base pointer (use offsetof())
Definition settings.h:107
string name
Path to the setting (e.g., "window/width")
Definition settings.h:106
stvar deftyp
Default value AND type specification.
Definition settings.h:108
VFS Object.
Definition vfsobj.h:25
Variant type containers and type-safe variadic argument support.