Skip to main content

TimestampSelector

TimestampSelector

Row selector that uses timestamps. More…

#include <IRowSelector.h>

Inherits from IRowSelector

Public Functions

Name
TimestampSelector(std::vector< TimeFrameIndex > timestamps, std::shared_ptr< TimeFrame > timeFrame)
Constructs a TimestampSelector with the given timestamps.
virtual size_t getRowCount() const override
Gets the total number of rows in the table.
virtual TableViewRowDescriptor getDescriptor(size_t row_index) const override
Gets a descriptor for the specified row index.
const std::vector< TimeFrameIndex > & getTimestamps() const
Gets the timestamps used for row selection.
std::shared_ptr< TimeFrame > getTimeFrame() const
Gets the TimeFrame key used for this selector.

Additional inherited members

Public Functions inherited from IRowSelector

Name
virtual ~IRowSelector()

Detailed Description

class TimestampSelector;

Row selector that uses timestamps.

This implementation defines rows based on a vector of timestamps.

Public Functions Documentation

function TimestampSelector

explicit TimestampSelector(
    std::vector< TimeFrameIndex > timestamps,
    std::shared_ptr< TimeFrame > timeFrame
)

Constructs a TimestampSelector with the given timestamps.

Parameters:

  • timestamps Vector of timestamps to use for row selection.
  • timeFrame Shared pointer to the TimeFrame object that provides the mapping between timestamps and indices.

function getRowCount

virtual size_t getRowCount() const override

Gets the total number of rows in the table.

Return: The number of rows (size of timestamps vector).

Reimplements: IRowSelector::getRowCount

function getDescriptor

virtual TableViewRowDescriptor getDescriptor(
    size_t row_index
) const override

Gets a descriptor for the specified row index.

Parameters:

  • row_index The index of the row to get the descriptor for.

Return: TableViewRowDescriptor containing the source timestamp for the row.

Reimplements: IRowSelector::getDescriptor

function getTimestamps

const std::vector< TimeFrameIndex > & getTimestamps() const

Gets the timestamps used for row selection.

Return: Const reference to the timestamps vector.

function getTimeFrame

inline std::shared_ptr< TimeFrame > getTimeFrame() const

Gets the TimeFrame key used for this selector.

Return: Shared pointer to the TimeFrame object.


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