FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
Loading...
Searching...
No Matches
Data Structures
fdl_handles.h File Reference

Internal handle types and handle cache for opaque FDL sub-objects. More...

#include <jsoncons/json.hpp>
#include <memory>
#include <unordered_map>
#include <vector>
#include "fdl_constants.h"

Go to the source code of this file.

Data Structures

struct  fdl_framing_intent
 Handle to a framing intent (root-level, single index). More...
 
struct  fdl_context
 Handle to a context (root-level, single index). More...
 
struct  fdl_canvas_template
 Handle to a canvas template (root-level, single index). More...
 
struct  fdl_canvas
 Handle to a canvas (child of context, two-level index). More...
 
struct  fdl_framing_decision
 Handle to a framing decision (child of canvas, three-level index). More...
 
struct  fdl_clip_id
 Handle to a clip ID (child of context, one-level index). More...
 
struct  fdl_file_sequence
 Handle to a file sequence (grandchild of context, via clip_id, one-level index). More...
 
struct  fdl_handle_cache
 Cache container for all handle types — lives on fdl_doc. More...
 

Functions

Index packing helpers for deduplication map keys
uint64_t pack_key (uint32_t a, uint32_t b)
 Pack two 32-bit indices into a 64-bit map key.
 
uint64_t pack_key3 (uint32_t a, uint32_t b, uint32_t c)
 Pack three indices into a 64-bit map key (20 bits each, a in high bits).
 

Detailed Description

Internal handle types and handle cache for opaque FDL sub-objects.

Each handle stores path indices into the document's ojson tree and resolves its node lazily via node(). Handles are stable across array reallocations (e.g., push_back). Lifetime is managed by the owning fdl_doc through the fdl_handle_cache. Deduplication maps ensure at most one handle per index path.

Function Documentation

◆ pack_key()

uint64_t pack_key ( uint32_t  a,
uint32_t  b 
)
inline

Pack two 32-bit indices into a 64-bit map key.

Parameters
aHigh 32 bits.
bLow 32 bits.
Returns
Packed key.

◆ pack_key3()

uint64_t pack_key3 ( uint32_t  a,
uint32_t  b,
uint32_t  c 
)
inline

Pack three indices into a 64-bit map key (20 bits each, a in high bits).

Parameters
aBits [40..59].
bBits [20..39].
cBits [0..19].
Returns
Packed key.