src/DataManager/utils/TableView/core/RowDescriptor.h
src/DataManager/utils/TableView/core/RowDescriptor.h
Classes
| Name | |
|---|---|
| struct | RowId Lightweight row identity for expanded rows (e.g., per-line in a timestamp). |
| struct | ExtendedRowDescriptor Extended row descriptor carrying compact source identity and optional entity index. |
Types
| Name | |
|---|---|
| using std::uint32_t | DataSourceId |
| using std::variant< std::monostate, size_t, TimeFrameIndex, TimeFrameInterval > | TableViewRowDescriptor A variant type that can hold any of the possible source types that can define a row. |
Types Documentation
using DataSourceId
using DataSourceId = std::uint32_t;using TableViewRowDescriptor
using TableViewRowDescriptor = std::variant<
std::monostate,
size_t,
TimeFrameIndex,
TimeFrameInterval
>;A variant type that can hold any of the possible source types that can define a row.
This type allows for type-safe reverse lookup from a TableView row back to its original source definition. It makes the system easily extensible for new row types.
Source code
#ifndef ROW_DESCRIPTOR_H
#define ROW_DESCRIPTOR_H
#include "TimeFrame/TimeFrameIndex.hpp"
#include "TimeFrame/interval_data.hpp"
#include "Entity/EntityTypes.hpp"
#include <cstddef>
#include <optional>
#include <variant>
#include <vector>
using DataSourceId = std::uint32_t;
using TableViewRowDescriptor = std::variant<
std::monostate, // For cases where there's no descriptor
size_t, // For IndexSelector
TimeFrameIndex, // For TimestampSelector
TimeFrameInterval // For IntervalSelector
>;
struct RowId {
TimeFrameIndex timeIndex{0};
std::optional<int> entityIndex{}; // Per-timestamp local index (e.g., line index)
};
struct ExtendedRowDescriptor {
DataSourceId sourceId{};
RowId row{};
// Optional contributing entities for this row (singleton for entity-expanded rows)
std::vector<EntityId> contributingEntities{};
};
#endif // ROW_DESCRIPTOR_HUpdated on 2026-11-13 at 20:25:43 +0000