|
TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
|
Per-element header describing the following data item. More...
#include <tec_nd_types.hpp>
Public Member Functions | |
| ElemHeader () | |
| Default constructor (unknown element). | |
| ElemHeader (Tag _tag, Size _size, Count _count=1) | |
| Construct with explicit tag, size, and count. | |
Public Attributes | |
| Tag | tag |
| Type and property tag. | |
| Size | size |
| Payload size in bytes (excluding this header). | |
| Count | count |
| Number of elements (for containers/sequences; 1 for scalars). | |
Per-element header describing the following data item.
Fixed size: 8 bytes. Precedes every serialized element.
| Byte | Size | Field | Type | Description |
|---|---|---|---|---|
| 0–1 | 2 | tag | Tag (uint16_t) | Type and property tag (encodes scalar/float/signed/sequence/container/object etc.). |
| 2–5 | 4 | size | Size (uint32_t) | Payload size in bytes excluding this ElemHeader (0 for containers/objects that compute size dynamically). |
| 6–7 | 2 | count | Count (uint16_t) | Number of elements: - 1 for scalars and sequences - Actual count for containers (clamped to 65535) |
This layout is guaranteed to be contiguous and exactly the sizes shown on all platforms due to the packing directive.