Skip to content

PayloadOffsetCache

#include <sbio/core/state_handle.hh>
struct PayloadOffsetCache

Defined in src/lib/sbio/core/state_handle.hh:169

A cache of field offsets within fetched DataUnits.

The cache is intended to live on the SegmentCursor which can be constructed in a safe manner per each EPolicy (defined via SegmentState). Usage in this manner allows safe writes to the cache without synchronization.

Return Name Description
SBIO_HD bool find const inline Look up the cached offset of a field.
SBIO_HD void store inline Cache the offset at which a field was found.

const inline

inline SBIO_HD bool find(hd_std::uint32_t field_id, hd_std::uint32_t & offset) const

Defined in src/lib/sbio/core/state_handle.hh:180

Look up the cached offset of a field.

true if the field has a cached offset.

Parameter Type Description
field_id hd_std::uint32_t The field’s position in the MetadataInventory.
offset hd_std::uint32_t & The cached offset, if found.

inline

inline SBIO_HD void store(hd_std::uint32_t field_id, hd_std::uint32_t offset)

Defined in src/lib/sbio/core/state_handle.hh:196

Cache the offset at which a field was found.

Parameter Type Description
field_id hd_std::uint32_t The field’s position in the MetadataInventory.
offset hd_std::uint32_t The offset of the field within the DataUnit.
Return Name Description
constexpr hd_std::size_t NumSlots static constexpr
constexpr hd_std::uint32_t NoField static constexpr

static constexpr

constexpr hd_std::size_t NumSlots { 8 }

Defined in src/lib/sbio/core/state_handle.hh:170


static constexpr

constexpr hd_std::uint32_t NoField { 0xFFFFFFFFu }

Defined in src/lib/sbio/core/state_handle.hh:171

Return Name Description
hd_std::array< Slot, NumSlots > m_slots

hd_std::array< Slot, NumSlots > m_slots {}

Type: hd_std::array< Slot, NumSlots >

Defined in src/lib/sbio/core/state_handle.hh:206