OpenCPN Partial API docs
Loading...
Searching...
No Matches
Table Class Reference

Represents a NxM simple table with captions. More...

#include <printtable.h>

Inheritance diagram for Table:
PrintTable

Public Member Functions

Tableoperator<< (const int &)
 
Tableoperator<< (const double &)
 
Tableoperator<< (const wxString &)
 
std::vector< std::vector< wxString > > & GetData ()
 
void StartFillData ()
 
void StartFillHeader ()
 
void StartFillWidths ()
 
int GetRowHeight (int i)
 

Protected Member Functions

void Start ()
 
void NewRow ()
 

Protected Attributes

int nrows
 
int ncols
 
bool create_next_row
 
std::vector< std::vector< wxString > > data
 
std::vector< double > widths
 
std::vector< wxString > header
 
TableState state
 

Detailed Description

Represents a NxM simple table with captions.

Input operator is "<<" Number of columns and rows are given dynamically by the input data. Captions are given by first input line. Every cell is given column by column. Next row is given by "<< '\n'" (or << endl)

Definition at line 62 of file printtable.h.

Constructor & Destructor Documentation

◆ Table()

Table::Table ( )

Definition at line 124 of file printtable.cpp.

◆ ~Table()

Table::~Table ( )

Definition at line 132 of file printtable.cpp.

Member Function Documentation

◆ GetData()

std::vector< std::vector< wxString > > & Table::GetData ( )
inline

Definition at line 86 of file printtable.h.

◆ GetRowHeight()

int Table::GetRowHeight ( int  i)
inline

Definition at line 94 of file printtable.h.

◆ NewRow()

void Table::NewRow ( )
protected

Definition at line 147 of file printtable.cpp.

◆ operator<<() [1/3]

Table & Table::operator<< ( const double &  cellcontent)

Definition at line 152 of file printtable.cpp.

◆ operator<<() [2/3]

Table & Table::operator<< ( const int &  cellcontent)

Definition at line 188 of file printtable.cpp.

◆ operator<<() [3/3]

Table & Table::operator<< ( const wxString &  cellcontent)

Definition at line 168 of file printtable.cpp.

◆ Start()

void Table::Start ( )
protected

Definition at line 140 of file printtable.cpp.

◆ StartFillData()

void Table::StartFillData ( )
inline

Definition at line 88 of file printtable.h.

◆ StartFillHeader()

void Table::StartFillHeader ( )
inline

Definition at line 90 of file printtable.h.

◆ StartFillWidths()

void Table::StartFillWidths ( )
inline

Definition at line 92 of file printtable.h.

Member Data Documentation

◆ create_next_row

bool Table::create_next_row
protected

Definition at line 67 of file printtable.h.

◆ data

std::vector<std::vector<wxString> > Table::data
protected

Definition at line 69 of file printtable.h.

◆ header

std::vector<wxString> Table::header
protected

Definition at line 71 of file printtable.h.

◆ ncols

int Table::ncols
protected

Definition at line 65 of file printtable.h.

◆ nrows

int Table::nrows
protected

Definition at line 64 of file printtable.h.

◆ state

TableState Table::state
protected

Definition at line 72 of file printtable.h.

◆ widths

std::vector<double> Table::widths
protected

Definition at line 70 of file printtable.h.


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