12#ifndef ALGORITHM_TABLEVIEW_H
13#define ALGORITHM_TABLEVIEW_H
50template <
typename RowDescT,
100 unsigned nFrames = mFrames.size();
101 unsigned currentRow = mRowData.size();
105 [](
const typename ParserT::HeaderType&
h) {
return (
h); },
106 [](
const typename ParserT::TrailerType& t) {
return (t); },
107 [](
const typename ParserT::TrailerType& t) {
108 return t.dataLength + ParserT::totalOffset;
110 [
this, currentRow](
typename ParserT::FrameInfo
entry) {
112 auto position = mColumns.begin();
113 while (position != mColumns.end() && *position < *
entry.header) {
116 if (position == mColumns.end() || *
entry.header < *position) {
117 mColumns.emplace(position, *
entry.header);
125 auto insertedFrames = mFrames.size() - nFrames;
126 if (insertedFrames > 0) {
127 mRowData.emplace_back(rowData);
129 return insertedFrames;
144 size_t getNRows()
const {
return mRowData.size(); }
149 if (
row < mRowData.size()) {
150 return mRowData[
row];
257 template <
unsigned Direction>
325 bool get(
unsigned row,
unsigned column, FrameData&
data)
327 if (this->mColumns.size() == 0) {
330 auto element = this->mFrames.find(FrameIndex{this->mColumns[column],
row});
331 if (element != this->mFrames.end()) {
332 data = element->second;
339 std::map<FrameIndex, FrameData> mFrames;
341 std::vector<ColumnIndexType> mColumns;
343 std::vector<RowDescType> mRowData;
Class for time synchronization of RawReader instances.
Iterator class for configurable direction, i.e. either row or column.
iterator(IteratorDirections direction, TableView *parent, unsigned row=0, unsigned column=0)
bool operator!=(const self_type &other) const
value_type operator*() const
bool operator==(const self_type &other) const
IteratorDirections mDirection
iterator for the outer access of the index, either row or column direction
iterator end()
end of the inner iteration
iterator begin()
begin the inner iteration
typename base::value_type value_type
outerIterator(TableView *parent, unsigned index)
static const unsigned direction
outerIterator< iterator::kAlongRow > ColumnIterator
definition of the outer iterator over column
ColumnIterator begin()
begin of the outer iteration
ColumnIterator end()
end of outer iteration
ColumnDescT ColumnIndexType
void clear()
clear the index, i.e. all internal lists
FrameData(* AccessFct)(unsigned, unsigned)
size_t getNRows() const
get number of rows, i.e. number rows in the created index
size_t getNColumns() const
get number of columns in the created index
const RowDescType & getRowData(size_t row) const
get row data for a data set
size_t addRow(RowDescType rowData, std::byte *seqData, size_t seqSize)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
descriptor pointing to payload of one frame
FrameIndex is composed from column description and row number.
bool operator<(const FrameIndex &rh) const
ColumnIndexType columnIndex
VectorOfTObjectPtrs other