RaggedAnalogStorageBase
RaggedAnalogStorageBase
CRTP base class for ragged analog storage implementations. More…
#include <RaggedAnalogStorage.hpp>
Public Functions
| Name | |
|---|---|
| size_t | size() const Get total number of float entries across all times. |
| bool | empty() const Check if storage is empty. |
| TimeFrameIndex | getTime(size_t idx) const Get the TimeFrameIndex at a flat index. |
| float | getValue(size_t idx) const Get the float value at a flat index. |
| std::pair< size_t, size_t > | getTimeRange(TimeFrameIndex time) const Get range of flat indices for a specific time. |
| size_t | getTimeCount() const Get number of distinct times with data. |
| bool | hasDataAtTime(TimeFrameIndex time) const Check if data exists at a specific time. |
| std::span< float const > | getValuesAtTime(TimeFrameIndex time) const Get values at a specific time as a span. |
| RaggedAnalogStorageType | getStorageType() const Get the storage type identifier. |
| bool | isView() const Check if this is a view (doesn’t own data). |
| bool | isLazy() const Check if this is lazy storage. |
| RaggedAnalogStorageCache | tryGetCache() const Try to get cached pointers for fast-path access. |
Protected Functions
| Name | |
|---|---|
| ~RaggedAnalogStorageBase() =default |
Detailed Description
template <typename Derived >
class RaggedAnalogStorageBase;CRTP base class for ragged analog storage implementations.
Template Parameters:
- Derived The concrete storage implementation type
Uses Curiously Recurring Template Pattern to eliminate virtual function overhead while maintaining a polymorphic interface. This is specialized for float data without EntityId support.
The SoA (Structure of Arrays) layout stores parallel vectors:
- TimeFrameIndex times[]
- float values[]
Time ranges are stored as a map from TimeFrameIndex to (start, end) index pairs, where each time can have multiple float values.
Public Functions Documentation
function size
inline size_t size() constGet total number of float entries across all times.
function empty
inline bool empty() constCheck if storage is empty.
function getTime
inline TimeFrameIndex getTime(
size_t idx
) constGet the TimeFrameIndex at a flat index.
Parameters:
- idx Flat index in [0, size())
function getValue
inline float getValue(
size_t idx
) constGet the float value at a flat index.
Parameters:
- idx Flat index in [0, size())
function getTimeRange
inline std::pair< size_t, size_t > getTimeRange(
TimeFrameIndex time
) constGet range of flat indices for a specific time.
Parameters:
- time The TimeFrameIndex to query
Return: Pair of (start_idx, end_idx) where end is exclusive, or (0,0) if not found
function getTimeCount
inline size_t getTimeCount() constGet number of distinct times with data.
function hasDataAtTime
inline bool hasDataAtTime(
TimeFrameIndex time
) constCheck if data exists at a specific time.
function getValuesAtTime
inline std::span< float const > getValuesAtTime(
TimeFrameIndex time
) constGet values at a specific time as a span.
Parameters:
- time The time to query
Return: span of float values, empty if no data at this time
function getStorageType
inline RaggedAnalogStorageType getStorageType() constGet the storage type identifier.
function isView
inline bool isView() constCheck if this is a view (doesn’t own data).
function isLazy
inline bool isLazy() constCheck if this is lazy storage.
function tryGetCache
inline RaggedAnalogStorageCache tryGetCache() constTry to get cached pointers for fast-path access.
Return: RaggedAnalogStorageCache with valid pointers if contiguous, invalid otherwise
Protected Functions Documentation
function ~RaggedAnalogStorageBase
~RaggedAnalogStorageBase() =defaultUpdated on 2026-11-13 at 20:25:40 +0000