CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
settingstree.h
1#pragma once
2// This header file is auto-generated!
3// Do not make changes to this file or they will be overwritten.
4// clang-format off
5#include <cx/obj.h>
6#include <cx/thread.h>
7#include <cx/fs/vfsobj.h>
8#include <cx/ssdtree/ssdtreeobj.h>
9
10typedef struct VFSDir VFSDir;
11typedef struct SettingsTree SettingsTree;
12typedef struct SettingsTree_WeakRef SettingsTree_WeakRef;
13saDeclarePtr(SettingsTree);
14saDeclarePtr(SettingsTree_WeakRef);
15
16typedef struct SettingsTree_ClassIf {
17 ObjIface* _implements;
18 ObjIface* _parent;
19 size_t _size;
20
21 _objfactory_guaranteed SSDNode* (*createNode)(_In_ void* self, _In_range_(SSD_Create_None+1, SSD_Create_Count-1) SSDCreateType crtype);
22} SettingsTree_ClassIf;
23extern SettingsTree_ClassIf SettingsTree_ClassIf_tmpl;
24
25typedef struct SettingsTree {
26 union {
27 SettingsTree_ClassIf* _;
28 void* _is_SettingsTree;
29 void* _is_SSDTree;
30 void* _is_ObjInst;
31 };
32 ObjClassInfo* _clsinfo;
33 atomic(uintptr) _ref;
34 atomic(ptr) _weakref;
35
36 RWLock lock;
37 SSDTreeDebug dbg;
38 uint32 flags;
39 int64 modified; // The most recent last-modified timestamp of any node in the tree
40 SSDNodeFactory factories[SSD_Create_Count]; // Factory functions for if this tree wants to use derived node classes
41 VFS* vfs;
42 string filename;
43 int64 interval; // interval to flush to disk
44 int64 check; // timestamp of last background check
45 int64 saved; // timestamp the settings were last saved to disk
46 bool checkbound; // re-check all bound variables at next flush
47} SettingsTree;
48extern ObjClassInfo SettingsTree_clsinfo;
49#define SettingsTree(inst) ((SettingsTree*)(unused_noeval((inst) && &((inst)->_is_SettingsTree)), (inst)))
50#define SettingsTreeNone ((SettingsTree*)NULL)
51
52typedef struct SettingsTree_WeakRef {
53 union {
54 ObjInst* _inst;
55 void* _is_SettingsTree_WeakRef;
56 void* _is_SSDTree_WeakRef;
57 void* _is_ObjInst_WeakRef;
58 };
59 atomic(uintptr) _ref;
60 RWLock _lock;
61} SettingsTree_WeakRef;
62#define SettingsTree_WeakRef(inst) ((SettingsTree_WeakRef*)(unused_noeval((inst) && &((inst)->_is_SettingsTree_WeakRef)), (inst)))
63
64_objfactory_guaranteed SettingsTree* SettingsTree_create();
65// SettingsTree* settingstreeCreate();
66#define settingstreeCreate() SettingsTree_create()
67
68// SSDNode* settingstreeCreateNode(SettingsTree* self, SSDCreateType crtype);
69#define settingstreeCreateNode(self, crtype) (self)->_->createNode(SettingsTree(self), crtype)
70
#define saDeclarePtr(name)
Definition sarray.h:98
#define _objfactory_guaranteed
Definition objimpl.h:104
enum SSD_CREATE_TYPE_ENUM SSDCreateType
Node creation types for specifying which kind of node to create.
@ SSD_Create_None
Do not create a node.
Definition ssdshared.h:25
@ SSD_Create_Count
Total number of creation types (internal use)
Definition ssdshared.h:30
Threading system aggregated header.
CX Object System - Object-oriented programming in C.
VFS Object.
Definition vfsobj.h:25
VFS object definitions.