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 69 of file printtable.h.

Constructor & Destructor Documentation

◆ Table()

Table::Table ( )

Definition at line 130 of file printtable.cpp.

◆ ~Table()

Table::~Table ( )

Definition at line 138 of file printtable.cpp.

Member Function Documentation

◆ GetData()

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

Definition at line 93 of file printtable.h.

◆ GetRowHeight()

int Table::GetRowHeight ( int  i)
inline

Definition at line 101 of file printtable.h.

◆ NewRow()

void Table::NewRow ( )
protected

Definition at line 153 of file printtable.cpp.

◆ operator<<() [1/3]

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

Definition at line 158 of file printtable.cpp.

◆ operator<<() [2/3]

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

Definition at line 194 of file printtable.cpp.

◆ operator<<() [3/3]

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

Definition at line 174 of file printtable.cpp.

◆ Start()

void Table::Start ( )
protected

Definition at line 146 of file printtable.cpp.

◆ StartFillData()

void Table::StartFillData ( )
inline

Definition at line 95 of file printtable.h.

◆ StartFillHeader()

void Table::StartFillHeader ( )
inline

Definition at line 97 of file printtable.h.

◆ StartFillWidths()

void Table::StartFillWidths ( )
inline

Definition at line 99 of file printtable.h.

Member Data Documentation

◆ create_next_row

bool Table::create_next_row
protected

Definition at line 74 of file printtable.h.

◆ data

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

Definition at line 76 of file printtable.h.

◆ header

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

Definition at line 78 of file printtable.h.

◆ ncols

int Table::ncols
protected

Definition at line 72 of file printtable.h.

◆ nrows

int Table::nrows
protected

Definition at line 71 of file printtable.h.

◆ state

TableState Table::state
protected

Definition at line 79 of file printtable.h.

◆ widths

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

Definition at line 77 of file printtable.h.


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