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
15CX_C_BEGIN
16
105
115
121
142SSDNode* setsOpen(VFS* vfs, strref path, int64 flush_interval);
143
151bool setsClose(SSDNode** psets);
152
161bool setsFlush(SSDNode* sets);
162
170void setsSetDirty(SSDNode* sets);
171
173
179
212bool setsBind(SSDNode* sets, const SetsBindSpec* bindings, void* base);
213
220void setsUnbindAll(SSDNode* sets);
221
229void setsCheckBound(SSDNode* sets);
230
242bool setsImport(SSDNode* sets, const SetsBindSpec* bindings, void* base);
243
255bool setsExport(SSDNode* sets, const SetsBindSpec* bindings, void* base);
256
258
266
286#define setsGetSub(sets, path) ssdSubtree(sets, path, SSD_Create_Hashtable)
287
308#define setsGet(sets, path, type, out, def) ssdCopyOutD(sets, path, type, out, def)
309
327#define setsSet(sets, path, type, val) ssdSet(sets, path, true, stvar(type, val))
328
342#define setsRemove(sets, path) ssdRemove(sets, path)
343
345
347
348CX_C_END
void setsCheckBound(SSDNode *sets)
void setsUnbindAll(SSDNode *sets)
bool setsExport(SSDNode *sets, const SetsBindSpec *bindings, void *base)
bool setsImport(SSDNode *sets, const SetsBindSpec *bindings, void *base)
bool setsBind(SSDNode *sets, const 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:162
Semi-Structured Data (SSD) tree public API.
intptr offset
Byte offset of variable from base pointer (use offsetof())
Definition settings.h:112
string name
Path to the setting (e.g., "window/width")
Definition settings.h:111
stvar deftyp
Default value AND type specification.
Definition settings.h:113
VFS Object.
Definition vfsobj.h:51
Variant type containers and type-safe variadic argument support.