Skip to main content

Neuralyzer::Entity::Lineage::IEntityDataSource

Neuralyzer::Entity::Lineage::IEntityDataSource

Interface for data-source-specific entity resolution. More…

#include <LineageResolver.hpp>

Inherited by Neuralyzer::Lineage::DataManagerEntityDataSource

Public Functions

Name
virtual ~IEntityDataSource() =default
virtual std::vector< EntityId > getEntityIds(std::string const & data_key, TimeFrameIndex time, std::size_t local_index) const =0
Get EntityIds from a container at a specific time and index.
virtual std::vector< EntityId > getAllEntityIdsAtTime(std::string const & data_key, TimeFrameIndex time) const =0
Get ALL EntityIds from a container at a specific time.
virtual std::unordered_set< EntityId > getAllEntityIds(std::string const & data_key) const =0
Get all EntityIds in a container (across all times).
virtual std::size_t getElementCount(std::string const & data_key, TimeFrameIndex time) const =0
Get the count of elements at a specific time (for iteration).

Detailed Description

class Neuralyzer::Entity::Lineage::IEntityDataSource;

Interface for data-source-specific entity resolution.

Note: Implementations must be thread-safe if the resolver is used from multiple threads.

This interface abstracts away the concrete data storage from lineage resolution. Implementations (e.g., DataManagerEntityDataSource) provide the actual data access.

By programming to this interface, the lineage system can be tested independently of DataManager and reused with different storage backends.

Public Functions Documentation

function ~IEntityDataSource

virtual ~IEntityDataSource() =default

function getEntityIds

virtual std::vector< EntityId > getEntityIds(
    std::string const & data_key,
    TimeFrameIndex time,
    std::size_t local_index
) const =0

Get EntityIds from a container at a specific time and index.

Parameters:

  • data_key Container identifier
  • time Time frame index
  • local_index Index within that time (for ragged containers)

Return: EntityIds found at that location (empty if none/not found)

Reimplemented by: Neuralyzer::Lineage::DataManagerEntityDataSource::getEntityIds

For containers that store multiple entities per time point (ragged), the local_index selects which entity to return.

function getAllEntityIdsAtTime

virtual std::vector< EntityId > getAllEntityIdsAtTime(
    std::string const & data_key,
    TimeFrameIndex time
) const =0

Get ALL EntityIds from a container at a specific time.

Parameters:

  • data_key Container identifier
  • time Time frame index

Return: All EntityIds at that time

Reimplemented by: Neuralyzer::Lineage::DataManagerEntityDataSource::getAllEntityIdsAtTime

Returns all entity IDs at the given time point, regardless of local index.

function getAllEntityIds

virtual std::unordered_set< EntityId > getAllEntityIds(
    std::string const & data_key
) const =0

Get all EntityIds in a container (across all times).

Parameters:

  • data_key Container identifier

Return: Set of all EntityIds in the container

Reimplemented by: Neuralyzer::Lineage::DataManagerEntityDataSource::getAllEntityIds

Returns the complete set of entity IDs stored in the container, useful for bulk operations.

function getElementCount

virtual std::size_t getElementCount(
    std::string const & data_key,
    TimeFrameIndex time
) const =0

Get the count of elements at a specific time (for iteration).

Parameters:

  • data_key Container identifier
  • time Time frame index

Return: Number of elements at that time

Reimplemented by: Neuralyzer::Lineage::DataManagerEntityDataSource::getElementCount

Used to determine how many entities exist at a time point, enabling iteration over all elements.


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