#include <table.hh>

Public Member Functions | ||||
| table (void) | ||||
| table (const std::string &title) | ||||
| table (const table &x) | ||||
| virtual | ~table (void) | |||
| table * | clone (void) const | |||
| table & | operator= (const table &x) | |||
| void | write (writer &out) const | |||
| int | addColumn (const std::string &title) | |||
| int | addRow (void) | |||
| void | eraseRow (int row, int count=1) throw (std::runtime_error) | |||
| void | insertData (int row, int col, double x, int wid=-1, int prec=-1) throw (std::runtime_error) | |||
| Replace cell contents with formatted number. | ||||
| void | insertData (int row, int col, long x, int wid=-1, int radix=10) throw (std::runtime_error) | |||
| Replace cell contents with formatted integer. | ||||
| void | insertData (int row, int col, const std::string &txt) throw (std::runtime_error) | |||
| Replace cell contents with specified string. | ||||
| void | insertData (int row, int col, const object &obj) throw (std::runtime_error) | |||
| Replace cell contents with specified data. | ||||
| void | insertRow (int row) throw (std::runtime_error) | |||
Add a row to the table.
| ||||
| int | getNRow (void) const | |||
| int | getNColumn (void) const | |||
| cell & | refHeader (int col) throw (std::runtime_error) | |||
| const cell & | refHeader (int col) const throw (std::runtime_error) | |||
| cell & | refCell (int row, int col) throw (std::runtime_error) | |||
| const cell & | refCell (int row, int col) const throw (std::runtime_error) | |||
| void | setBorder (bool On=true) | |||
| html::table::table | ( | void | ) |
Construct an empty table. brief Default constructor.
| html::table::table | ( | const std::string & | title | ) |
| html::table::table | ( | const table & | x | ) |
Construct an exact copy of the specified table. brief Copy constructor.
| virtual html::table::~table | ( | void | ) | [virtual] |
Destroy the table. brief Table destructor.
| table* html::table::clone | ( | void | ) | const [virtual] |
Create an exact copy of the table. This implements the virtual html::object function. brief Clone a table.
Implements html::object.
| void html::table::write | ( | writer & | out | ) | const [virtual] |
Write the table to an HTML document stream. brief Write the table to the HTML document.
Reimplemented from html::object.
| int html::table::addColumn | ( | const std::string & | title | ) |
| int html::table::addRow | ( | void | ) |
Add an empty row to the end of the table. The row number is returned.
| void html::table::eraseRow | ( | int | row, | |
| int | count = 1 | |||
| ) | throw (std::runtime_error) |
Erase the specified row(s) from the table. All valid cells in the deleted rows are deleted. brief Erase one or more rows.
| row | Number of first row to be erased | |
| count | Number of rows to be erased |
| void html::table::insertData | ( | int | row, | |
| int | col, | |||
| double | x, | |||
| int | wid = -1, |
|||
| int | prec = -1 | |||
| ) | throw (std::runtime_error) |
| void html::table::insertData | ( | int | row, | |
| int | col, | |||
| long | x, | |||
| int | wid = -1, |
|||
| int | radix = 10 | |||
| ) | throw (std::runtime_error) |
| void html::table::insertData | ( | int | row, | |
| int | col, | |||
| const std::string & | txt | |||
| ) | throw (std::runtime_error) |
| void html::table::insertData | ( | int | row, | |
| int | col, | |||
| const object & | obj | |||
| ) | throw (std::runtime_error) |
Replace cell contents with specified data.
Insert an arbitrary html object into the cell at the specified row and column. If a cell exists at the specified location, its contents are replaced. Otherwise a new cell is created.
| row | Row number of cell | |
| col | Column number of cell | |
| obj | Html object to replace cell contents. |
| runtime_error |
| void html::table::insertRow | ( | int | row | ) | throw (std::runtime_error) |
Add a row to the table.
| runtime_error | exception will be thrown after creating a new row at the end of the table. |
Insert an empty row in front of the specified row number. The new row will have number row and all existing rows numbered i >= row will have their row number incremented. If row is not valid (row < 0 or row > nRow).
| row | Position to insert row. |
| int html::table::getNRow | ( | void | ) | const [inline] |
| int html::table::getNColumn | ( | void | ) | const [inline] |
| html::cell & html::table::refHeader | ( | int | col | ) | throw (std::runtime_error) [inline] |
Get a reference to the header for the specified column. brief Get a column header reference.
| col | Column number. |
| const html::cell & html::table::refHeader | ( | int | col | ) | const throw (std::runtime_error) [inline] |
Get a constant reference to the header for the specified column. brief Get a column header reference.
| col | Column number. |
| html::cell & html::table::refCell | ( | int | row, | |
| int | col | |||
| ) | throw (std::runtime_error) [inline] |
| const html::cell & html::table::refCell | ( | int | row, | |
| int | col | |||
| ) | const throw (std::runtime_error) [inline] |
| void html::table::setBorder | ( | bool | On = true |
) |
1.5.4