|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
C ABI wrappers for document creation, parsing, serialization, and memory management. More...
#include "fdl/fdl_core.h"#include "fdl_compat.h"#include "fdl_constants.h"#include "fdl_doc.h"#include <cstring>#include <functional>#include <new>#include <string>#include <unordered_map>#include "fdl_tl_cache.h"Functions | |
| fdl_doc_t * | fdl_doc_create (void) |
| Create an empty FDL document. | |
| void | fdl_doc_free (fdl_doc_t *doc) |
| Free an FDL document and all associated handles. | |
| fdl_parse_result_t | fdl_doc_parse_json (const char *json_str, size_t json_len) |
| Parse a JSON string into an FDL document. | |
| const char * | fdl_doc_get_uuid (const fdl_doc_t *doc) |
| Get the UUID from a parsed FDL document. | |
| const char * | fdl_doc_get_fdl_creator (const fdl_doc_t *doc) |
| Get the fdl_creator from a parsed FDL document. | |
| const char * | fdl_doc_get_default_framing_intent (const fdl_doc_t *doc) |
| Get the default_framing_intent from a parsed FDL document. | |
| char * | fdl_doc_to_json (const fdl_doc_t *doc, int indent) |
| Serialize document to canonical JSON string. | |
C ABI wrappers for document creation, parsing, serialization, and memory management.
| fdl_doc_t * fdl_doc_create | ( | void | ) |
Create an empty FDL document.
| void fdl_doc_free | ( | fdl_doc_t * | doc | ) |
Free an FDL document and all associated handles.
After this call, all handles (contexts, canvases, framing decisions, etc.) obtained from this document are invalid. Safe to call with NULL.
| doc | Document to free, or NULL (no-op). |
| fdl_parse_result_t fdl_doc_parse_json | ( | const char * | json_str, |
| size_t | json_len | ||
| ) |
Parse a JSON string into an FDL document.
| json_str | JSON string to parse (need not be null-terminated). |
| json_len | Length of json_str in bytes. |
< POSIX strdup.
< POSIX strdup.
< POSIX strdup.
| const char * fdl_doc_get_uuid | ( | const fdl_doc_t * | doc | ) |
Get the UUID from a parsed FDL document.
| doc | Document to query. |
| const char * fdl_doc_get_fdl_creator | ( | const fdl_doc_t * | doc | ) |
Get the fdl_creator from a parsed FDL document.
| doc | Document to query. |
| const char * fdl_doc_get_default_framing_intent | ( | const fdl_doc_t * | doc | ) |
Get the default_framing_intent from a parsed FDL document.
| doc | Document to query. |
| char * fdl_doc_to_json | ( | const fdl_doc_t * | doc, |
| int | indent | ||
| ) |
Serialize document to canonical JSON string.
Keys are ordered per the FDL specification; null values are excluded.
| doc | Document to serialize. |
| indent | Number of spaces per indent level (0 for compact JSON). |
< POSIX strdup.