EMANE
1.2.1
|
A two dimentional statistic table that holds Any values. More...
#include <statistictable.h>
Public Member Functions | |
~StatisticTable () | |
void | setCell (const Key &key, std::size_t columnIndex, const Any &any) |
void | setRow (const Key &key, const std::vector< Any > &anys) |
void | addRow (const Key &key, const std::vector< Any > &anys={}) |
void | deleteRow (const Key &key) |
StatisticTableLabels | getLabels () const override |
StatisticTableValues | getValues () const override |
void | clear () override |
A two dimentional statistic table that holds Any values.
Key | Type of the keys. Each row in the table is uniquely identified by its key value |
Compare | A binary predicate that takes two element keys as arguments and returns a bool |
scolumn | The column used when sorting the table using Compare |
Definition at line 62 of file statistictable.h.
EMANE::StatisticTable< Key, Compare, sortIndex >::~StatisticTable | ( | ) |
Destroys an instance
Definition at line 41 of file statistictable.inl.
void EMANE::StatisticTable< Key, Compare, sortIndex >::addRow | ( | const Key & | key, |
const std::vector< Any > & | anys = {} |
||
) |
Adds a row to the table
key | Table row key |
anys | Vector of any values |
StatisticTableException | when either the row key is already in use or the number of columns in the row values does not match the table |
Definition at line 98 of file statistictable.inl.
|
overridevirtual |
Clears the table
Implements EMANE::StatisticTablePublisher.
Definition at line 172 of file statistictable.inl.
void EMANE::StatisticTable< Key, Compare, sortIndex >::deleteRow | ( | const Key & | key | ) |
Deletes a row from the table
key | Table row key |
Definition at line 127 of file statistictable.inl.
|
overridevirtual |
Gets the table column labels
Implements EMANE::StatisticTablePublisher.
Definition at line 164 of file statistictable.inl.
|
overridevirtual |
Gets the table values
Implements EMANE::StatisticTablePublisher.
Definition at line 136 of file statistictable.inl.
void EMANE::StatisticTable< Key, Compare, sortIndex >::setCell | ( | const Key & | key, |
std::size_t | columnIndex, | ||
const Any & | any | ||
) |
Sets a specified table cell
key | Table row key |
columnIndex | Row column index (indexed from 0) |
any | Value to set |
StatisticTableException | when either the row key of column index are invalid |
Definition at line 45 of file statistictable.inl.
void EMANE::StatisticTable< Key, Compare, sortIndex >::setRow | ( | const Key & | key, |
const std::vector< Any > & | anys | ||
) |
Sets a column of a specified row
key | Table row key |
anys | Vector of any values |
StatisticTableException | when either the row key is invalid or the number of columns in the row values does not match the table |
Definition at line 72 of file statistictable.inl.