|
CX Framework
Cross-platform C utility framework
|
Functions | |
| SerWriter * | serSsdWriterCreate (flags_t flags) |
| SSDNode * | serSsdWriterRoot (SerWriter *w) |
| SerReader * | serSsdReaderCreate (SSDNode *root, flags_t flags) |
An SSD tree is a backend like any other, which bridges the schema'd and schema-free halves of cx: struct to SSDNode on the way out, SSDNode to struct on the way back.
It is also the abstraction's sanity check. A tree builder is about as different from a byte stream as a backend can be, and the data model accommodates it without special-casing – no encoding, no parsing, nothing but the vocabulary itself.
| SerReader * serSsdReaderCreate | ( | SSDNode * | root, |
| flags_t | flags | ||
| ) |
Creates a reader over an existing SSD tree.
| root | Root node to read from; a reference is acquired for the reader's lifetime |
| flags | SerFlagsEnum options |
Example:
| SerWriter * serSsdWriterCreate | ( | flags_t | flags | ) |
Creates a writer that builds an SSD tree.
The tree is created by the writer and owned by it until serSsdWriterRoot() is called, so unlike the byte-stream backends there is no caller-supplied transport.
| flags | SerFlagsEnum options; none are specific to this backend |
Example:
| SSDNode * serSsdWriterRoot | ( | SerWriter * | w | ) |
Returns the tree the writer built.
Call after serWriterFinish(). The caller receives a new reference and must release it; the writer keeps its own, so the tree survives serWriterDestroy().
| w | Writer to take the result from |