ViewAnalogDataStorage
ViewAnalogDataStorage
View-based analog data storage that references another storage. More…
#include <ViewAnalogDataStorage.hpp>
Inherits from AnalogDataStorageBase< ViewAnalogDataStorage >
Public Functions
| Name | |
|---|---|
| ViewAnalogDataStorage(std::shared_ptr< VectorAnalogDataStorage const > source, std::size_t start_index, std::size_t end_index) Construct a view referencing source storage. |
|
| ~ViewAnalogDataStorage() =default | |
| float | getValueAtImpl(std::size_t index) const |
| std::size_t | sizeImpl() const |
| std::span< float const > | getSpanImpl() const Get span over the view’s data range. |
| std::span< float const > | getSpanRangeImpl(std::size_t start, std::size_t end) const |
| bool | isContiguousImpl() const |
| AnalogStorageType | getStorageTypeImpl() const |
| AnalogDataStorageCache | tryGetCacheImpl() const |
| std::shared_ptr< VectorAnalogDataStorage const > const & | source() const Get the source storage. |
| float const * | data() const Get raw pointer to contiguous data. |
| std::size_t | startIndex() const Get the start index in source storage. |
| std::size_t | endIndex() const Get the end index in source storage. |
Additional inherited members
Public Functions inherited from AnalogDataStorageBase< ViewAnalogDataStorage >
| Name | |
|---|---|
| std::size_t | size() const Get the number of samples in storage. |
| bool | empty() const Check if storage is empty. |
| float | getValueAt(std::size_t index) const Get the value at a specific index. |
| std::span< float const > | getSpan() const Get a span over all data (if contiguous). |
| std::span< float const > | getSpanRange(std::size_t start, std::size_t end) const Get a span over a sub-range of data (if contiguous). |
| bool | isContiguous() const Check if data is stored contiguously in memory. |
| AnalogStorageType | getStorageType() const Get the storage type identifier. |
| bool | isView() const Check if this storage is a view (non-owning). |
| bool | isLazy() const Check if this storage is lazy-evaluated. |
| AnalogDataStorageCache | tryGetCache() const Try to get a cache for fast-path contiguous access. |
Protected Functions inherited from AnalogDataStorageBase< ViewAnalogDataStorage >
| Name | |
|---|---|
| ~AnalogDataStorageBase() =default |
Detailed Description
class ViewAnalogDataStorage;View-based analog data storage that references another storage.
Holds a shared_ptr to a source VectorAnalogDataStorage and start/end indices into that source. Enables zero-copy filtered views for range queries.
Public Functions Documentation
function ViewAnalogDataStorage
inline ViewAnalogDataStorage(
std::shared_ptr< VectorAnalogDataStorage const > source,
std::size_t start_index,
std::size_t end_index
)Construct a view referencing source storage.
Parameters:
- source Shared pointer to source vector storage.
- start_index Starting index (inclusive).
- end_index Ending index (exclusive).
function ~ViewAnalogDataStorage
~ViewAnalogDataStorage() =defaultfunction getValueAtImpl
inline float getValueAtImpl(
std::size_t index
) constfunction sizeImpl
inline std::size_t sizeImpl() constfunction getSpanImpl
inline std::span< float const > getSpanImpl() constGet span over the view’s data range.
Since source is contiguous, we can provide efficient span access.
function getSpanRangeImpl
inline std::span< float const > getSpanRangeImpl(
std::size_t start,
std::size_t end
) constfunction isContiguousImpl
inline bool isContiguousImpl() constfunction getStorageTypeImpl
inline AnalogStorageType getStorageTypeImpl() constfunction tryGetCacheImpl
inline AnalogDataStorageCache tryGetCacheImpl() constfunction source
inline std::shared_ptr< VectorAnalogDataStorage const > const & source() constGet the source storage.
function data
inline float const * data() constGet raw pointer to contiguous data.
function startIndex
inline std::size_t startIndex() constGet the start index in source storage.
function endIndex
inline std::size_t endIndex() constGet the end index in source storage.
Updated on 2026-11-13 at 20:25:39 +0000