DigitalEventStorageWrapper
DigitalEventStorageWrapper
Type-erased storage wrapper for digital event storage. More…
#include <DigitalEventStorage.hpp>
Public Functions
| Name | |
|---|---|
| template <typename StorageImpl > |
DigitalEventStorageWrapper(StorageImpl storage) Construct wrapper from any storage implementation. |
| DigitalEventStorageWrapper() | |
| DigitalEventStorageWrapper(DigitalEventStorageWrapper && ) =default | |
| DigitalEventStorageWrapper & | operator=(DigitalEventStorageWrapper && ) =default |
| DigitalEventStorageWrapper(DigitalEventStorageWrapper const & ) =default | |
| DigitalEventStorageWrapper & | operator=(DigitalEventStorageWrapper const & ) =default |
| size_t | size() const |
| bool | empty() const |
| TimeFrameIndex | getEvent(size_t idx) const |
| EntityId | getEntityId(size_t idx) const |
| std::optional< size_t > | findByTime(TimeFrameIndex time) const |
| std::optional< size_t > | findByEntityId(EntityId id) const |
| std::pair< size_t, size_t > | getTimeRange(TimeFrameIndex start, TimeFrameIndex end) const |
| bool | hasEventAtTime(TimeFrameIndex time) const |
| DigitalEventStorageType | getStorageType() const |
| bool | isView() const |
| bool | isLazy() const |
| bool | isRelative() const |
| DigitalEventTimeDomain | getTimeDomain() const |
| ClockTicks | getRelativeEvent(size_t idx) const |
| std::optional< size_t > | findByRelativeTime(ClockTicks time) const |
| std::pair< size_t, size_t > | getRelativeTimeRange(ClockTicks start, ClockTicks end) const |
| DigitalEventStorageCache | tryGetCache() const |
| bool | addEvent(TimeFrameIndex time, EntityId entity_id) |
| bool | removeEvent(TimeFrameIndex time) |
| bool | removeByEntityId(EntityId id) |
| void | reserve(size_t capacity) |
| void | clear() |
| void | setEntityIds(std::vector< EntityId > ids) |
| template <typename StorageType > StorageType * |
tryGet() |
| template <typename StorageType > StorageType const * |
tryGet() const |
| OwningDigitalEventStorage * | tryGetMutableOwning() |
| OwningDigitalEventStorage const * | tryGetOwning() const |
| std::shared_ptr< OwningDigitalEventStorage const > | getSharedOwningStorage() const Get shared pointer to owning storage for creating views. |
Detailed Description
class DigitalEventStorageWrapper;Type-erased storage wrapper for digital event storage.
Provides a uniform interface for any storage backend while hiding the concrete storage type. Supports lazy transforms with unbounded ViewType.
Public Functions Documentation
function DigitalEventStorageWrapper
template <typename StorageImpl >
inline explicit DigitalEventStorageWrapper(
StorageImpl storage
)Construct wrapper from any storage implementation.
function DigitalEventStorageWrapper
DigitalEventStorageWrapper()function DigitalEventStorageWrapper
DigitalEventStorageWrapper(
DigitalEventStorageWrapper &&
) =defaultfunction operator=
DigitalEventStorageWrapper & operator=(
DigitalEventStorageWrapper &&
) =defaultfunction DigitalEventStorageWrapper
DigitalEventStorageWrapper(
DigitalEventStorageWrapper const &
) =defaultfunction operator=
DigitalEventStorageWrapper & operator=(
DigitalEventStorageWrapper const &
) =defaultfunction size
inline size_t size() constfunction empty
inline bool empty() constfunction getEvent
inline TimeFrameIndex getEvent(
size_t idx
) constfunction getEntityId
inline EntityId getEntityId(
size_t idx
) constfunction findByTime
inline std::optional< size_t > findByTime(
TimeFrameIndex time
) constfunction findByEntityId
inline std::optional< size_t > findByEntityId(
EntityId id
) constfunction getTimeRange
inline std::pair< size_t, size_t > getTimeRange(
TimeFrameIndex start,
TimeFrameIndex end
) constfunction hasEventAtTime
inline bool hasEventAtTime(
TimeFrameIndex time
) constfunction getStorageType
inline DigitalEventStorageType getStorageType() constfunction isView
inline bool isView() constfunction isLazy
inline bool isLazy() constfunction isRelative
inline bool isRelative() constfunction getTimeDomain
inline DigitalEventTimeDomain getTimeDomain() constfunction getRelativeEvent
inline ClockTicks getRelativeEvent(
size_t idx
) constfunction findByRelativeTime
inline std::optional< size_t > findByRelativeTime(
ClockTicks time
) constfunction getRelativeTimeRange
inline std::pair< size_t, size_t > getRelativeTimeRange(
ClockTicks start,
ClockTicks end
) constfunction tryGetCache
inline DigitalEventStorageCache tryGetCache() constfunction addEvent
inline bool addEvent(
TimeFrameIndex time,
EntityId entity_id
)function removeEvent
inline bool removeEvent(
TimeFrameIndex time
)function removeByEntityId
inline bool removeByEntityId(
EntityId id
)function reserve
inline void reserve(
size_t capacity
)function clear
inline void clear()function setEntityIds
inline void setEntityIds(
std::vector< EntityId > ids
)function tryGet
template <typename StorageType >
inline StorageType * tryGet()function tryGet
template <typename StorageType >
inline StorageType const * tryGet() constfunction tryGetMutableOwning
OwningDigitalEventStorage * tryGetMutableOwning()function tryGetOwning
OwningDigitalEventStorage const * tryGetOwning() const