DataManagerExtension
DataManagerExtension
Extension to DataManager that provides the TableView factory interface. More…
#include <DataManagerExtension.h>
Public Types
| Name | |
|---|---|
| using std::variant< std::shared_ptr< IAnalogSource >, std::shared_ptr< DigitalEventSeries >, std::shared_ptr< DigitalIntervalSeries >, std::shared_ptr< LineData >, std::shared_ptr< PointData > > | SourceHandle |
Public Functions
| Name | |
|---|---|
| DataManagerExtension(DataManager & dataManager) Constructs a DataManagerExtension. |
|
| std::shared_ptr< IAnalogSource > | getAnalogSource(std::string const & name) Unified access point for analog data sources. |
| std::shared_ptr< LineData > | getLineSource(std::string const & name) |
| void | clearCache() Clears the adapter cache. |
| std::optional< SourceHandle > | resolveSource(std::string const & name) Resolve a source name to a concrete adapter variant. |
| std::optional< DataTypeVariant > | getDataVariant(std::string const & name) |
Detailed Description
class DataManagerExtension;Extension to DataManager that provides the TableView factory interface.
This class extends the existing DataManager with the getAnalogSource factory method as described in the TableView design document. It can create and cache IAnalogSource adapters for both physical data (AnalogTimeSeries) and virtual data (PointData components).
Public Types Documentation
using SourceHandle
using DataManagerExtension::SourceHandle = std::variant<
std::shared_ptr<IAnalogSource>,
std::shared_ptr<DigitalEventSeries>,
std::shared_ptr<DigitalIntervalSeries>,
std::shared_ptr<LineData>,
std::shared_ptr<PointData>>;Public Functions Documentation
function DataManagerExtension
explicit DataManagerExtension(
DataManager & dataManager
)Constructs a DataManagerExtension.
Parameters:
- dataManager Reference to the underlying DataManager instance.
function getAnalogSource
std::shared_ptr< IAnalogSource > getAnalogSource(
std::string const & name
)Unified access point for analog data sources.
Parameters:
- name The name of the analog data source.
Return: Shared pointer to IAnalogSource, or nullptr if not found.
This factory method handles:
- Physical data: “LFP” -> AnalogTimeSeries via AnalogDataAdapter
Note: Point component extraction (.x/.y) has been removed. Use PointData directly with dedicated computers for component extraction.
function getLineSource
std::shared_ptr< LineData > getLineSource(
std::string const & name
)function clearCache
void clearCache()Clears the adapter cache.
This method clears cached IAnalogSource adapters. Should be called when the underlying analog data changes to ensure fresh adapters are created.
Note: Other data types (DigitalEventSeries, DigitalIntervalSeries, LineData, PointData) are accessed directly from DataManager without caching.
function resolveSource
std::optional< SourceHandle > resolveSource(
std::string const & name
)Resolve a source name to a concrete adapter variant.
Tries known source kinds (analog, interval, event, line, point) and returns the first matching adapter wrapped in a variant. Returns std::nullopt if not found.
function getDataVariant
std::optional< DataTypeVariant > getDataVariant(
std::string const & name
)Updated on 2026-11-13 at 20:25:41 +0000