Skip to main content

ViewRaggedAnalogStorage

ViewRaggedAnalogStorage

View-based ragged analog storage that references another storage. More…

#include <RaggedAnalogStorage.hpp>

Inherits from RaggedAnalogStorageBase< ViewRaggedAnalogStorage >

Public Functions

Name
ViewRaggedAnalogStorage(std::shared_ptr< OwningRaggedAnalogStorage const > source)
Construct a view referencing source storage.
void setIndices(std::vector< size_t > indices)
Set the indices this view includes.
void setAllIndices()
Create view of all entries.
void filterByTimeRange(TimeFrameIndex start, TimeFrameIndex end)
Filter by time range [start, end] inclusive.
std::shared_ptr< OwningRaggedAnalogStorage const > source() const
Get the source storage.
std::vector< size_t > const & indices() const
Get the indices vector.
size_t sizeImpl() const
TimeFrameIndex getTimeImpl(size_t idx) const
float getValueImpl(size_t idx) const
std::pair< size_t, size_t > getTimeRangeImpl(TimeFrameIndex time) const
size_t getTimeCountImpl() const
RaggedAnalogStorageType getStorageTypeImpl() const
std::span< float const > getValuesAtTimeImpl(TimeFrameIndex time) const
RaggedAnalogStorageCache tryGetCacheImpl() const
Return cache if view is contiguous.

Additional inherited members

Public Functions inherited from RaggedAnalogStorageBase< ViewRaggedAnalogStorage >

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 inherited from RaggedAnalogStorageBase< ViewRaggedAnalogStorage >

Name
~RaggedAnalogStorageBase() =default

Detailed Description

class ViewRaggedAnalogStorage;

View-based ragged analog storage that references another storage.

Holds a shared_ptr to a source OwningRaggedAnalogStorage and a vector of indices into that source. Enables zero-copy filtered views.

Public Functions Documentation

function ViewRaggedAnalogStorage

inline explicit ViewRaggedAnalogStorage(
    std::shared_ptr< OwningRaggedAnalogStorage const > source
)

Construct a view referencing source storage.

Parameters:

  • source Shared pointer to source storage

function setIndices

inline void setIndices(
    std::vector< size_t > indices
)

Set the indices this view includes.

function setAllIndices

inline void setAllIndices()

Create view of all entries.

function filterByTimeRange

inline void filterByTimeRange(
    TimeFrameIndex start,
    TimeFrameIndex end
)

Filter by time range [start, end] inclusive.

function source

inline std::shared_ptr< OwningRaggedAnalogStorage const > source() const

Get the source storage.

function indices

inline std::vector< size_t > const & indices() const

Get the indices vector.

function sizeImpl

inline size_t sizeImpl() const

function getTimeImpl

inline TimeFrameIndex getTimeImpl(
    size_t idx
) const

function getValueImpl

inline float getValueImpl(
    size_t idx
) const

function getTimeRangeImpl

inline std::pair< size_t, size_t > getTimeRangeImpl(
    TimeFrameIndex time
) const

function getTimeCountImpl

inline size_t getTimeCountImpl() const

function getStorageTypeImpl

inline RaggedAnalogStorageType getStorageTypeImpl() const

function getValuesAtTimeImpl

inline std::span< float const > getValuesAtTimeImpl(
    TimeFrameIndex time
) const

function tryGetCacheImpl

inline RaggedAnalogStorageCache tryGetCacheImpl() const

Return cache if view is contiguous.


Updated on 2026-11-13 at 20:25:39 +0000