|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
C ABI for collection traversal (count, at, find_by_id/label) and handle allocation. More...
#include "fdl/fdl_core.h"#include "fdl_collection_helpers.h"#include "fdl_compat.h"#include "fdl_constants.h"#include "fdl_doc.h"#include <cinttypes>#include <cstring>#include <string_view>#include <tuple>Typedefs | |
| using | ojson = jsoncons::ojson |
Functions | |
| uint32_t | fdl_doc_framing_intents_count (fdl_doc_t *doc) |
| Get the number of framing intents in the document. | |
| fdl_framing_intent_t * | fdl_doc_framing_intent_at (fdl_doc_t *doc, uint32_t index) |
| Get a framing intent by index. | |
| fdl_framing_intent_t * | fdl_doc_framing_intent_find_by_id (fdl_doc_t *doc, const char *id) |
| Find a framing intent by its ID string. | |
| uint32_t | fdl_doc_contexts_count (fdl_doc_t *doc) |
| Get the number of contexts in the document. | |
| fdl_context_t * | fdl_doc_context_at (fdl_doc_t *doc, uint32_t index) |
| Get a context by index. | |
| fdl_context_t * | fdl_doc_context_find_by_label (fdl_doc_t *doc, const char *label) |
| Find a context by its label string. | |
| uint32_t | fdl_doc_canvas_templates_count (fdl_doc_t *doc) |
| Get the number of canvas templates in the document. | |
| fdl_canvas_template_t * | fdl_doc_canvas_template_at (fdl_doc_t *doc, uint32_t index) |
| Get a canvas template by index. | |
| fdl_canvas_template_t * | fdl_doc_canvas_template_find_by_id (fdl_doc_t *doc, const char *id) |
| Find a canvas template by its ID string. | |
| uint32_t | fdl_context_canvases_count (const fdl_context_t *ctx) |
| Get the number of canvases in a context. | |
| fdl_canvas_t * | fdl_context_canvas_at (fdl_context_t *ctx, uint32_t index) |
| Get a canvas by index within a context. | |
| fdl_canvas_t * | fdl_context_find_canvas_by_id (fdl_context_t *ctx, const char *id) |
| Find a canvas by its ID within a context. | |
| uint32_t | fdl_canvas_framing_decisions_count (const fdl_canvas_t *canvas) |
| Get the number of framing decisions in a canvas. | |
| fdl_framing_decision_t * | fdl_canvas_framing_decision_at (fdl_canvas_t *canvas, uint32_t index) |
| Get a framing decision by index within a canvas. | |
| fdl_framing_decision_t * | fdl_canvas_find_framing_decision_by_id (fdl_canvas_t *canvas, const char *id) |
| Find a framing decision by its ID within a canvas. | |
| fdl_resolve_canvas_result_t | fdl_context_resolve_canvas_for_dimensions (fdl_context_t *ctx, fdl_dimensions_f64_t input_dims, fdl_canvas_t *canvas, fdl_framing_decision_t *framing) |
| Resolve canvas for given input dimensions. | |
C ABI for collection traversal (count, at, find_by_id/label) and handle allocation.
Uses template helpers from fdl_collection_helpers.h to eliminate duplication across the 5 collection types. Each C ABI function is a thin wrapper that acquires the document lock and delegates to the appropriate template.
| uint32_t fdl_doc_framing_intents_count | ( | fdl_doc_t * | doc | ) |
Get the number of framing intents in the document.
| doc | Document handle. |
| fdl_framing_intent_t * fdl_doc_framing_intent_at | ( | fdl_doc_t * | doc, |
| uint32_t | index | ||
| ) |
Get a framing intent by index.
| doc | Document handle. |
| index | Zero-based index. |
| fdl_framing_intent_t * fdl_doc_framing_intent_find_by_id | ( | fdl_doc_t * | doc, |
| const char * | id | ||
| ) |
Find a framing intent by its ID string.
| doc | Document handle. |
| id | Framing intent ID to search for. |
| uint32_t fdl_doc_contexts_count | ( | fdl_doc_t * | doc | ) |
Get the number of contexts in the document.
| doc | Document handle. |
| fdl_context_t * fdl_doc_context_at | ( | fdl_doc_t * | doc, |
| uint32_t | index | ||
| ) |
Get a context by index.
| doc | Document handle. |
| index | Zero-based index. |
| fdl_context_t * fdl_doc_context_find_by_label | ( | fdl_doc_t * | doc, |
| const char * | label | ||
| ) |
Find a context by its label string.
| doc | Document handle. |
| label | Context label to search for. |
| uint32_t fdl_doc_canvas_templates_count | ( | fdl_doc_t * | doc | ) |
Get the number of canvas templates in the document.
| doc | Document handle. |
| fdl_canvas_template_t * fdl_doc_canvas_template_at | ( | fdl_doc_t * | doc, |
| uint32_t | index | ||
| ) |
Get a canvas template by index.
| doc | Document handle. |
| index | Zero-based index. |
| fdl_canvas_template_t * fdl_doc_canvas_template_find_by_id | ( | fdl_doc_t * | doc, |
| const char * | id | ||
| ) |
Find a canvas template by its ID string.
| doc | Document handle. |
| id | Canvas template ID to search for. |
| uint32_t fdl_context_canvases_count | ( | const fdl_context_t * | ctx | ) |
Get the number of canvases in a context.
| ctx | Context handle. |
| fdl_canvas_t * fdl_context_canvas_at | ( | fdl_context_t * | ctx, |
| uint32_t | index | ||
| ) |
Get a canvas by index within a context.
| ctx | Context handle. |
| index | Zero-based index. |
| fdl_canvas_t * fdl_context_find_canvas_by_id | ( | fdl_context_t * | ctx, |
| const char * | id | ||
| ) |
Find a canvas by its ID within a context.
| ctx | Context handle. |
| id | Canvas ID to search for. |
| uint32_t fdl_canvas_framing_decisions_count | ( | const fdl_canvas_t * | canvas | ) |
Get the number of framing decisions in a canvas.
| canvas | Canvas handle. |
| fdl_framing_decision_t * fdl_canvas_framing_decision_at | ( | fdl_canvas_t * | canvas, |
| uint32_t | index | ||
| ) |
Get a framing decision by index within a canvas.
| canvas | Canvas handle. |
| index | Zero-based index. |
| fdl_framing_decision_t * fdl_canvas_find_framing_decision_by_id | ( | fdl_canvas_t * | canvas, |
| const char * | id | ||
| ) |
Find a framing decision by its ID within a canvas.
| canvas | Canvas handle. |
| id | Framing decision ID to search for. |
| fdl_resolve_canvas_result_t fdl_context_resolve_canvas_for_dimensions | ( | fdl_context_t * | ctx, |
| fdl_dimensions_f64_t | input_dims, | ||
| fdl_canvas_t * | canvas, | ||
| fdl_framing_decision_t * | framing | ||
| ) |
Resolve canvas for given input dimensions.
If input_dims match the canvas dimensions, returns the original canvas/framing with was_resolved=0. If they don't match and the canvas is derived (id != source_canvas_id), searches sibling canvases for one with matching dimensions and a framing decision with the same label.
| ctx | Context containing the canvases to search. |
| input_dims | Input dimensions to match against. |
| canvas | Starting canvas (may be returned if dimensions match). |
| framing | Starting framing decision (label used for matching). |
< POSIX strdup.
< POSIX strdup.
< POSIX strdup.