ViewDigitalEventStorage
ViewDigitalEventStorage
View-based digital event storage that references another storage. More…
#include <ViewDigitalEventStorage.hpp>
Inherits from DigitalEventStorageBase< ViewDigitalEventStorage >
Public Functions
| Name | |
|---|---|
| ViewDigitalEventStorage(std::shared_ptr< OwningDigitalEventStorage 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 events. |
| void | filterByTimeRange(TimeFrameIndex start, TimeFrameIndex end) Filter by time range [start, end] inclusive. |
| void | filterByEntityIds(std::unordered_set< EntityId > const & ids) Filter by EntityId set. |
| std::shared_ptr< OwningDigitalEventStorage const > | source() const Get the source storage. |
| std::vector< size_t > const & | indices() const Get the indices vector. |
| size_t | sizeImpl() const |
| TimeFrameIndex | getEventImpl(size_t idx) const |
| EntityId | getEntityIdImpl(size_t idx) const |
| std::optional< size_t > | findByTimeImpl(TimeFrameIndex time) const |
| std::optional< size_t > | findByEntityIdImpl(EntityId id) const |
| std::pair< size_t, size_t > | getTimeRangeImpl(TimeFrameIndex start, TimeFrameIndex end) const |
| DigitalEventTimeDomain | getTimeDomainImpl() const |
| DigitalEventStorageType | getStorageTypeImpl() const |
| DigitalEventStorageCache | tryGetCacheImpl() const Return cache if view is contiguous. |
Additional inherited members
Public Functions inherited from DigitalEventStorageBase< ViewDigitalEventStorage >
| Name | |
|---|---|
| size_t | size() const Get total number of events. |
| bool | empty() const Check if storage is empty. |
| TimeFrameIndex | getEvent(size_t idx) const Get the event time at a flat index. |
| EntityId | getEntityId(size_t idx) const Get the EntityId at a flat index. |
| std::optional< size_t > | findByTime(TimeFrameIndex time) const Find the index of an event by its exact time. |
| std::optional< size_t > | findByEntityId(EntityId id) const Find the index of an event by its EntityId. |
| bool | hasEventAtTime(TimeFrameIndex time) const Check if an event exists at a specific time. |
| std::pair< size_t, size_t > | getTimeRange(TimeFrameIndex start, TimeFrameIndex end) const Get range of indices for events in [start, end] inclusive. |
| DigitalEventTimeDomain | getTimeDomain() const Get the time coordinate domain for this storage. |
| bool | isRelative() const Check if events are stored as relative ClockTicks. |
| ClockTicks | getRelativeEvent(size_t idx) const Get the relative event time at a flat index. |
| std::optional< size_t > | findByRelativeTime(ClockTicks time) const Find the index of an event by its exact relative time. |
| std::pair< size_t, size_t > | getRelativeTimeRange(ClockTicks start, ClockTicks end) const Get range of indices for events in [start, end] inclusive (relative time). |
| DigitalEventStorageType | 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. |
| bool | isRelativeOwning() const Check if this is relative owning storage. |
| DigitalEventStorageCache | tryGetCache() const Try to get cached pointers for fast-path access. |
Protected Functions inherited from DigitalEventStorageBase< ViewDigitalEventStorage >
| Name | |
|---|---|
| ~DigitalEventStorageBase() =default |
Detailed Description
class ViewDigitalEventStorage;View-based digital event storage that references another storage.
Holds a shared_ptr to a source OwningDigitalEventStorage and a vector of indices into that source. Enables zero-copy filtered views.
Public Functions Documentation
function ViewDigitalEventStorage
explicit ViewDigitalEventStorage(
std::shared_ptr< OwningDigitalEventStorage const > source
)Construct a view referencing source storage.
Parameters:
- source Shared pointer to source storage.
function setIndices
void setIndices(
std::vector< size_t > indices
)Set the indices this view includes.
function setAllIndices
void setAllIndices()Create view of all events.
function filterByTimeRange
void filterByTimeRange(
TimeFrameIndex start,
TimeFrameIndex end
)Filter by time range [start, end] inclusive.
function filterByEntityIds
void filterByEntityIds(
std::unordered_set< EntityId > const & ids
)Filter by EntityId set.
function source
std::shared_ptr< OwningDigitalEventStorage const > source() constGet the source storage.
function indices
inline std::vector< size_t > const & indices() constGet the indices vector.
function sizeImpl
inline size_t sizeImpl() constfunction getEventImpl
TimeFrameIndex getEventImpl(
size_t idx
) constfunction getEntityIdImpl
EntityId getEntityIdImpl(
size_t idx
) constfunction findByTimeImpl
std::optional< size_t > findByTimeImpl(
TimeFrameIndex time
) constfunction findByEntityIdImpl
std::optional< size_t > findByEntityIdImpl(
EntityId id
) constfunction getTimeRangeImpl
std::pair< size_t, size_t > getTimeRangeImpl(
TimeFrameIndex start,
TimeFrameIndex end
) constfunction getTimeDomainImpl
inline DigitalEventTimeDomain getTimeDomainImpl() constfunction getStorageTypeImpl
inline DigitalEventStorageType getStorageTypeImpl() constfunction tryGetCacheImpl
DigitalEventStorageCache tryGetCacheImpl() constReturn cache if view is contiguous.
Updated on 2026-11-13 at 20:25:39 +0000