|
CX Framework
Cross-platform C utility framework
|
Macros | |
| #define | ssdCreateHashtable(...) _ssdCreateRoot(SSD_Create_Hashtable, NULL, opt_flags(__VA_ARGS__)) |
| #define | ssdCreateArray(...) _ssdCreateRoot(SSD_Create_Array, NULL, opt_flags(__VA_ARGS__)) |
| #define | ssdCreateSingle(...) _ssdCreateRoot(SSD_Create_Single, NULL, opt_flags(__VA_ARGS__)) |
| #define | ssdCreateCustom(crtype, tree) _ssdCreateRoot(crtype, tree, 0) |
Typedefs | |
| typedef enum SSD_CREATE_TYPE_ENUM | SSDCreateType |
| Node creation types for specifying which kind of node to create. | |
Enumerations | |
| enum | SSD_FLAGS_ENUM { SSD_CaseInsensitive = 0x0001 } |
| Flags for configuring SSD tree behavior. More... | |
| enum | SSD_CREATE_TYPE_ENUM { SSD_Create_None = 0 , SSD_Create_Hashtable , SSD_Create_Array , SSD_Create_Single , SSD_Create_Count } |
| Node creation types for specifying which kind of node to create. More... | |
Functions for creating new SSD trees with different root node types.
| #define ssdCreateArray | ( | ... | ) | _ssdCreateRoot(SSD_Create_Array, NULL, opt_flags(__VA_ARGS__)) |
SSDNode *ssdCreateArray([flags])
Creates a new semi-structured tree with an array as its root.
Array nodes store indexed values accessible by integer indices, analogous to a JSON array.
| ... | (flags) Optional flags for the tree |
Example:
| #define ssdCreateCustom | ( | crtype, | |
| tree | |||
| ) | _ssdCreateRoot(crtype, tree, 0) |
SSDNode *ssdCreateCustom(crtype, tree)
Creates a tree with a custom node type using factory functions from the provided tree.
This is an advanced function for creating trees with custom derived node classes.
| crtype | The SSDCreateType indicating which factory to use |
| tree | The SSDTree object containing custom factory functions |
| #define ssdCreateHashtable | ( | ... | ) | _ssdCreateRoot(SSD_Create_Hashtable, NULL, opt_flags(__VA_ARGS__)) |
SSDNode *ssdCreateHashtable([flags])
Creates a new semi-structured tree with a hashtable as its root.
Hashtable nodes store key-value pairs where keys are strings and values are stvars. This is the most common root type, analogous to a JSON object.
| ... | (flags) Optional flags (SSD_CaseInsensitive for case-insensitive keys) |
Example:
| #define ssdCreateSingle | ( | ... | ) | _ssdCreateRoot(SSD_Create_Single, NULL, opt_flags(__VA_ARGS__)) |
SSDNode *ssdCreateSingle([flags])
Creates a new semi-structured tree with a single value as its root.
Single-value nodes hold exactly one stvar value. Supported types include integers, floats, strings, booleans, and objects.
| ... | (flags) Optional flags for the tree |
Example:
| enum SSD_CREATE_TYPE_ENUM |
Node creation types for specifying which kind of node to create.
Definition at line 24 of file ssdshared.h.
| enum SSD_FLAGS_ENUM |
Flags for configuring SSD tree behavior.
| Enumerator | |
|---|---|
| SSD_CaseInsensitive | Keys in hashtables are case-insensitive. |
Definition at line 19 of file ssdshared.h.