GEOS
Classes | Public Types | Public Member Functions | List of all members
geos::TableData Class Reference

Class for managing table data. More...

#include <TableData.hpp>

Classes

struct  CellData
 Representing a single cell's data within a TableData row. More...
 

Public Types

using DataRows = stdVector< stdVector< CellData > >
 Alias for table data rows with cells values.
 

Public Member Functions

bool operator< (TableData const &other) const
 Lexicographic comparison operator, can be used for ordering in containers. More...
 
bool operator== (TableData const &other) const
 Equality comparison of all cells. More...
 
size_t getSerializedSize () const
 Returns the total serialized byte size of all rows in the table. More...
 
void serialize (stdVector< buffer_unit_type > &serializedTableData) const
 Serializes the tableData into the output buffer. More...
 
template<typename ... Args>
void addRow (Args const &... args)
 Add a row to the table. The values passed to addRow (can be any type). More...
 
void addRow (stdVector< CellData > const &row)
 Add a row to the table. More...
 
void addSeparator ()
 Add a line separator to the table You must have filled values in TableData before using it.
 
void clear ()
 Reset data in the table.
 
void clearErrors ()
 Remove all errors.
 
stdVector< string > const & getErrorMsgs () const
 Get all error messages. More...
 
DataRows const & getCellsData () const
 
DataRows & getCellsData ()
 
TableErrorListing const & getErrorsList () const
 Get all error messages. More...
 
TableErrorListing & getErrorsList ()
 Get all error messages. More...
 
template<typename SortingFunc >
void sort (SortingFunc sortingFunctor)
 Sorts the rows using a custom comparator functor. More...
 

Detailed Description

Class for managing table data.

Definition at line 34 of file TableData.hpp.

Member Function Documentation

◆ addRow() [1/2]

template<typename ... Args>
void geos::TableData::addRow ( Args const &...  args)

Add a row to the table. The values passed to addRow (can be any type).

Parameters
argsCellData values to be added to the row.

Definition at line 287 of file TableData.hpp.

◆ addRow() [2/2]

void geos::TableData::addRow ( stdVector< CellData > const &  row)

Add a row to the table.

Parameters
rowA vector of string representing a row

◆ getCellsData() [1/2]

DataRows& geos::TableData::getCellsData ( )
inline
Returns
The const table data rows

Definition at line 147 of file TableData.hpp.

◆ getCellsData() [2/2]

DataRows const& geos::TableData::getCellsData ( ) const
inline
Returns
The const table data rows

Definition at line 141 of file TableData.hpp.

◆ getErrorMsgs()

stdVector< string > const& geos::TableData::getErrorMsgs ( ) const

Get all error messages.

Returns
The vector of error messages

◆ getErrorsList() [1/2]

TableErrorListing& geos::TableData::getErrorsList ( )
inline

Get all error messages.

Returns
The list of error messages

Definition at line 161 of file TableData.hpp.

◆ getErrorsList() [2/2]

TableErrorListing const& geos::TableData::getErrorsList ( ) const
inline

Get all error messages.

Returns
The list of error messages

Definition at line 154 of file TableData.hpp.

◆ getSerializedSize()

size_t geos::TableData::getSerializedSize ( ) const

Returns the total serialized byte size of all rows in the table.

Returns
Total size in bytes required to serialize the entire TableData.

◆ operator<()

bool geos::TableData::operator< ( TableData const &  other) const

Lexicographic comparison operator, can be used for ordering in containers.

Parameters
otherThe table data to compare against.
Returns
true if this table is ordered before other

◆ operator==()

bool geos::TableData::operator== ( TableData const &  other) const

Equality comparison of all cells.

Parameters
comparingTableTable to compare with
Returns
true if row count and sizes match and if all cell values are identical in both tables.

◆ serialize()

void geos::TableData::serialize ( stdVector< buffer_unit_type > &  serializedTableData) const

Serializes the tableData into the output buffer.

Parameters
serializedTableDataBuffer to append the serialized tableData.

◆ sort()

template<typename SortingFunc >
void geos::TableData::sort ( SortingFunc  sortingFunctor)
inline

Sorts the rows using a custom comparator functor.

Template Parameters
SortingFuncType of the sorting comparator functor.
Parameters
sortingFunctorComparator functor used to sort the rows.

Definition at line 170 of file TableData.hpp.


The documentation for this class was generated from the following file: