NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class is a specialisation for the standard wxGridTableBase supporting complex numbers as well as the internal data model. More...
#include <gridtable.hpp>
Public Member Functions | |
GridNumeReTable () | |
Default constructor. More... | |
GridNumeReTable (int numRows, int numCols) | |
General constructor. Will create an empty internal table. More... | |
GridNumeReTable (NumeRe::Table &&_extTable) | |
Move constructor taking the contents of the passed table. More... | |
virtual | ~GridNumeReTable () |
NumeRe::Table | getTable () |
NumeRe::Table | getTableCopy () |
This member function returns a copy of the internal table. More... | |
NumeRe::Table & | getTableRef () |
This member function returns a reference to the internal table. More... | |
virtual int | GetNumberRows () |
This member function will return the number of lines including the headlines handled by this data provider class. More... | |
virtual int | GetNumberCols () |
This member function will return the number of columns handled by this data provider class. More... | |
virtual bool | CanGetValueAs (int row, int col, const wxString &sTypeName) |
This virtual member function will tell the grid, which data types may be returned by the current cell. More... | |
virtual double | GetValueAsDouble (int row, int col) |
This virtual member function returns the selected cell value as a double. More... | |
virtual bool | GetValueAsBool (int row, int col) |
This virtual member function returns the selected cell value as a bool. More... | |
virtual void * | GetValueAsCustom (int row, int col, const wxString &sTypeName) |
This member function will return the internal data as a void pointer referencing the internal mu::value_type attribute. More... | |
virtual wxString | GetValue (int row, int col) |
This virtual member function returns the value of the selected cell as string. More... | |
virtual void | SetValue (int row, int col, const wxString &value) |
This virtual member function sets the passed value in the internal buffer. It's decided automatically, whether it's stored as a headline and whether a new headline is required. More... | |
virtual void | Clear () |
This virtual function redirects the control directly to the internal buffer and cleares it contents. More... | |
virtual bool | InsertRows (size_t pos=0, size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and inserts rows. More... | |
virtual bool | AppendRows (size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and appends rows. More... | |
virtual bool | DeleteRows (size_t pos=0, size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and deletes rows. More... | |
virtual bool | InsertCols (size_t pos=0, size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and inserts columns. More... | |
virtual bool | AppendCols (size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and appends columns. More... | |
virtual bool | DeleteCols (size_t pos=0, size_t numRows=1) |
This virtual function redirects the control directly to the internal buffer and deletes columns. More... | |
virtual wxString | GetRowLabelValue (int row) |
This virtual member function will return the label for the selected row as a string. More... | |
virtual wxString | GetColLabelValue (int col) |
This virtual member function will return the label for the selected column as a string. More... | |
double | min (const wxGridCellCoordsContainer &coords) const |
This member function calculates the minimal value in the range (r1,c1)->(r2,c2). More... | |
double | max (const wxGridCellCoordsContainer &coords) const |
This member function calculates the maximal value in the range (r1,c1)->(r2,c2). More... | |
mu::value_type | avg (const wxGridCellCoordsContainer &coords) const |
This member function calculates the average value of the range (r1,c1)->(r2,c2). More... | |
mu::value_type | sum (const wxGridCellCoordsContainer &coords) const |
This member function calculates the sum of the range (r1,c1)->(r2,c2). More... | |
std::vector< int > | getColumnTypes () const |
Returns the types of the handled table. More... | |
std::vector< std::string > | getCategories (int col) const |
Returns the categories in the selected column, if this is a categorical column. More... | |
Private Member Functions | |
int | getNumHeadlines () const |
This member function will return the number of headlines available in the internal buffer. More... | |
Private Attributes | |
NumeRe::Table | _table |
mu::value_type | value |
This class is a specialisation for the standard wxGridTableBase supporting complex numbers as well as the internal data model.
Definition at line 33 of file gridtable.hpp.
GridNumeReTable::GridNumeReTable | ( | ) |
GridNumeReTable::GridNumeReTable | ( | int | numRows, |
int | numCols | ||
) |
General constructor. Will create an empty internal table.
numRows | int |
numCols | int |
Definition at line 41 of file gridtable.cpp.
References _table.
GridNumeReTable::GridNumeReTable | ( | NumeRe::Table && | _extTable | ) |
Move constructor taking the contents of the passed table.
_extTable | NumeRe::Table&& |
Definition at line 54 of file gridtable.cpp.
References _table.
|
inlinevirtual |
Definition at line 44 of file gridtable.hpp.
|
virtual |
This virtual function redirects the control directly to the internal buffer and appends columns.
numRows | size_t |
Definition at line 424 of file gridtable.cpp.
References _table, and NumeRe::Table::appendCols().
|
virtual |
This virtual function redirects the control directly to the internal buffer and appends rows.
numRows | size_t |
Definition at line 347 of file gridtable.cpp.
References _table, and NumeRe::Table::appendLines().
mu::value_type GridNumeReTable::avg | ( | const wxGridCellCoordsContainer & | coords | ) | const |
This member function calculates the average value of the range (r1,c1)->(r2,c2).
coords | const wxGridCellCoordsContainer& |
Definition at line 571 of file gridtable.cpp.
References _table, wxGridCellCoordsContainer::contains(), wxGridCellCoordsContainer::getExtent(), getNumHeadlines(), NumeRe::Table::getValue(), mu::isnan(), wxGridCellsExtent::m_bottomright, and wxGridCellsExtent::m_topleft.
|
virtual |
This virtual member function will tell the grid, which data types may be returned by the current cell.
row | int |
col | int |
sTypeName | const wxString& |
Definition at line 140 of file gridtable.cpp.
References _table, NumeRe::Table::getColumn(), NumeRe::Table::getColumnType(), getNumHeadlines(), NumeRe::Table::getValue(), mu::imag(), mu::isnan(), TableColumn::isValid(), TableColumn::TYPE_DATETIME, TableColumn::TYPE_LOGICAL, TableColumn::TYPE_NONE, TableColumn::TYPE_STRING, and TableColumn::TYPE_VALUE.
|
virtual |
This virtual function redirects the control directly to the internal buffer and cleares it contents.
Definition at line 306 of file gridtable.cpp.
References _table, and NumeRe::Table::Clear().
|
virtual |
This virtual function redirects the control directly to the internal buffer and deletes columns.
pos | size_t |
numRows | size_t |
Definition at line 450 of file gridtable.cpp.
References _table, and NumeRe::Table::deleteCols().
|
virtual |
This virtual function redirects the control directly to the internal buffer and deletes rows.
pos | size_t |
numRows | size_t |
Definition at line 373 of file gridtable.cpp.
References _table, and NumeRe::Table::deleteLines().
std::vector< std::string > GridNumeReTable::getCategories | ( | int | col | ) | const |
Returns the categories in the selected column, if this is a categorical column.
col | int |
Definition at line 659 of file gridtable.cpp.
References _table, getCategories(), NumeRe::Table::getColumn(), NumeRe::Table::getColumnType(), and TableColumn::TYPE_CATEGORICAL.
Referenced by CombinedCellEditor::BeginEdit(), and getCategories().
|
virtual |
This virtual member function will return the label for the selected column as a string.
col | int |
Definition at line 493 of file gridtable.cpp.
References toString().
std::vector< int > GridNumeReTable::getColumnTypes | ( | ) | const |
Returns the types of the handled table.
Definition at line 640 of file gridtable.cpp.
References _table, NumeRe::Table::getCols(), and NumeRe::Table::getColumnType().
Referenced by CombinedCellEditor::BeginEdit(), TableViewer::layoutGrid(), and TableViewer::UpdateColumnAlignment().
|
virtual |
This member function will return the number of columns handled by this data provider class.
Definition at line 123 of file gridtable.cpp.
References _table, and NumeRe::Table::getCols().
|
virtual |
This member function will return the number of lines including the headlines handled by this data provider class.
Definition at line 109 of file gridtable.cpp.
References _table, NumeRe::Table::getLines(), getNumHeadlines(), and max.
|
private |
This member function will return the number of headlines available in the internal buffer.
Definition at line 68 of file gridtable.cpp.
References _table, and NumeRe::Table::getHeadCount().
Referenced by avg(), CanGetValueAs(), GetNumberRows(), GetRowLabelValue(), GetValue(), GetValueAsBool(), GetValueAsCustom(), GetValueAsDouble(), max(), min(), SetValue(), and sum().
|
virtual |
This virtual member function will return the label for the selected row as a string.
row | int |
Definition at line 475 of file gridtable.cpp.
References getNumHeadlines(), and toString().
|
inline |
Definition at line 46 of file gridtable.hpp.
References _table.
NumeRe::Table GridNumeReTable::getTableCopy | ( | ) |
This member function returns a copy of the internal table.
Definition at line 81 of file gridtable.cpp.
References _table.
NumeRe::Table & GridNumeReTable::getTableRef | ( | ) |
This member function returns a reference to the internal table.
Definition at line 95 of file gridtable.cpp.
References _table.
|
virtual |
This virtual member function returns the value of the selected cell as string.
row | int |
col | int |
Definition at line 246 of file gridtable.cpp.
References _table, NumeRe::Table::getCleanHeadPart(), NumeRe::Table::getCols(), NumeRe::Table::getLines(), getNumHeadlines(), NumeRe::Table::getValueAsString(), and replaceControlCharacters().
Referenced by CombinedCellEditor::BeginEdit().
|
virtual |
This virtual member function returns the selected cell value as a bool.
row | int |
col | int |
Definition at line 206 of file gridtable.cpp.
References _table, NumeRe::Table::getCols(), NumeRe::Table::getLines(), getNumHeadlines(), and NumeRe::Table::getValue().
|
virtual |
This member function will return the internal data as a void pointer referencing the internal mu::value_type attribute.
row | int |
col | int |
sTypeName | const wxString& |
Definition at line 230 of file gridtable.cpp.
References _table, getNumHeadlines(), NumeRe::Table::getValue(), and value.
|
virtual |
This virtual member function returns the selected cell value as a double.
row | int |
col | int |
Definition at line 184 of file gridtable.cpp.
References _table, NumeRe::Table::getCols(), NumeRe::Table::getLines(), getNumHeadlines(), and NumeRe::Table::getValue().
|
virtual |
This virtual function redirects the control directly to the internal buffer and inserts columns.
pos | size_t |
numRows | size_t |
Definition at line 399 of file gridtable.cpp.
References _table, and NumeRe::Table::insertCols().
|
virtual |
This virtual function redirects the control directly to the internal buffer and inserts rows.
pos | size_t |
numRows | size_t |
Definition at line 322 of file gridtable.cpp.
References _table, and NumeRe::Table::insertLines().
double GridNumeReTable::max | ( | const wxGridCellCoordsContainer & | coords | ) | const |
This member function calculates the maximal value in the range (r1,c1)->(r2,c2).
coords | const wxGridCellCoordsContainer& |
Definition at line 539 of file gridtable.cpp.
References _table, wxGridCellCoordsContainer::contains(), wxGridCellCoordsContainer::getExtent(), getNumHeadlines(), NumeRe::Table::getValue(), mu::isnan(), wxGridCellsExtent::m_bottomright, and wxGridCellsExtent::m_topleft.
double GridNumeReTable::min | ( | const wxGridCellCoordsContainer & | coords | ) | const |
This member function calculates the minimal value in the range (r1,c1)->(r2,c2).
coords | const wxGridCellCoordsContainer& |
Definition at line 507 of file gridtable.cpp.
References _table, wxGridCellCoordsContainer::contains(), wxGridCellCoordsContainer::getExtent(), getNumHeadlines(), NumeRe::Table::getValue(), mu::isnan(), wxGridCellsExtent::m_bottomright, and wxGridCellsExtent::m_topleft.
|
virtual |
This virtual member function sets the passed value in the internal buffer. It's decided automatically, whether it's stored as a headline and whether a new headline is required.
row | int |
col | int |
value | const wxString& |
Definition at line 270 of file gridtable.cpp.
References _table, getNumHeadlines(), NumeRe::Table::setHeadPart(), NumeRe::Table::setValueAsString(), and value.
mu::value_type GridNumeReTable::sum | ( | const wxGridCellCoordsContainer & | coords | ) | const |
This member function calculates the sum of the range (r1,c1)->(r2,c2).
coords | const wxGridCellCoordsContainer& |
Definition at line 610 of file gridtable.cpp.
References _table, wxGridCellCoordsContainer::contains(), wxGridCellCoordsContainer::getExtent(), getNumHeadlines(), NumeRe::Table::getValue(), mu::isnan(), wxGridCellsExtent::m_bottomright, and wxGridCellsExtent::m_topleft.
|
private |
Definition at line 36 of file gridtable.hpp.
Referenced by AppendCols(), AppendRows(), avg(), CanGetValueAs(), Clear(), DeleteCols(), DeleteRows(), getCategories(), getColumnTypes(), GetNumberCols(), GetNumberRows(), getNumHeadlines(), getTable(), getTableCopy(), getTableRef(), GetValue(), GetValueAsBool(), GetValueAsCustom(), GetValueAsDouble(), GridNumeReTable(), InsertCols(), InsertRows(), max(), min(), SetValue(), and sum().
|
private |
Definition at line 38 of file gridtable.hpp.
Referenced by GetValueAsCustom(), and SetValue().