20#include "../../kernel/core/utils/stringtools.hpp"
21#include "../../kernel/core/datamanagement/tablecolumnimpl.hpp"
56 _table = std::move(_extTable);
143 if (row == 0 && (sTypeName == wxGRID_VALUE_FLOAT || sTypeName ==
"complex"))
145 else if (row <
getNumHeadlines() && (sTypeName == wxGRID_VALUE_STRING || sTypeName ==
"plain"))
155 if (sTypeName == wxGRID_VALUE_FLOAT
160 if (sTypeName == wxGRID_VALUE_BOOL
233 return static_cast<void*
>(&
value);
286 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, nHeadRows,
getNumHeadlines() - nHeadRows);
287 GetView()->ProcessTableMessage(msg);
292 GetView()->ProcessTableMessage(msg);
330 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, pos, numRows);
331 GetView()->ProcessTableMessage(msg);
355 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, numRows);
356 GetView()->ProcessTableMessage(msg);
381 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, pos, numRows);
382 GetView()->ProcessTableMessage(msg);
407 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_COLS_INSERTED, pos, numRows);
408 GetView()->ProcessTableMessage(msg);
432 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_COLS_APPENDED, numRows);
433 GetView()->ProcessTableMessage(msg);
458 wxGridTableMessage msg(
this, wxGRIDTABLE_NOTIFY_COLS_DELETED, pos, numRows);
459 GetView()->ProcessTableMessage(msg);
522 if (
isnan(dMin) || val < dMin)
554 if (
isnan(dMax) || val > dMax)
596 return dSum / (double)nCount;
642 std::vector<int> vTypes;
664 return std::vector<std::string>();
A table column containing categorical values.
mu::value_type sum(const wxGridCellCoordsContainer &coords) const
This member function calculates the sum of the range (r1,c1)->(r2,c2).
mu::value_type avg(const wxGridCellCoordsContainer &coords) const
This member function calculates the average value of the range (r1,c1)->(r2,c2).
virtual wxString GetRowLabelValue(int row)
This virtual member function will return the label for the selected row as a string.
virtual void Clear()
This virtual function redirects the control directly to the internal buffer and cleares it contents.
virtual bool AppendCols(size_t numRows=1)
This virtual function redirects the control directly to the internal buffer and appends columns.
std::vector< std::string > getCategories(int col) const
Returns the categories in the selected column, if this is a categorical column.
virtual bool GetValueAsBool(int row, int col)
This virtual member function returns the selected cell value as a bool.
virtual wxString GetColLabelValue(int col)
This virtual member function will return the label for the selected column as a string.
virtual bool AppendRows(size_t numRows=1)
This virtual function redirects the control directly to the internal buffer and appends rows.
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.
GridNumeReTable()
Default constructor.
virtual int GetNumberRows()
This member function will return the number of lines including the headlines handled by this data pro...
double max(const wxGridCellCoordsContainer &coords) const
This member function calculates the maximal value in the range (r1,c1)->(r2,c2).
NumeRe::Table getTableCopy()
This member function returns a copy of the internal table.
std::vector< int > getColumnTypes() const
Returns the types of the handled table.
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.
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.
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.
virtual int GetNumberCols()
This member function will return the number of columns handled by this data provider class.
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...
double min(const wxGridCellCoordsContainer &coords) const
This member function calculates the minimal value in the range (r1,c1)->(r2,c2).
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...
NumeRe::Table & getTableRef()
This member function returns a reference to the internal table.
virtual double GetValueAsDouble(int row, int col)
This virtual member function returns the selected cell value as a double.
int getNumHeadlines() const
This member function will return the number of headlines available in the internal buffer.
virtual wxString GetValue(int row, int col)
This virtual member function returns the value of the selected cell as string.
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::val...
This data container is a copy- efficient table to interchange data between Kernel and GUI.
bool insertLines(size_t nPos=0, size_t nNum=1)
This member function inserts lines at the desired position.
TableColumn::ColumnType getColumnType(size_t j) const
Returns the type of the selected column.
void Clear()
This member function cleares the contents of this table.
bool appendLines(size_t nNum=1)
This member function appends lines.
std::string getValueAsString(size_t i, size_t j) const
Getter function for the value of the selected cell. The value is converted into a string.
bool deleteCols(size_t nPos=0, size_t nNum=1)
This member function delets columns at the desired position.
std::string getCleanHeadPart(size_t i, size_t part=0) const
Getter function for the selected part of the selected column's headline. Underscores and masked headl...
bool insertCols(size_t nPos=0, size_t nNum=1)
This member function inserts columns at the desired position.
int getHeadCount() const
Getter function for the needed number of headlines (depending on the number of linebreaks found in th...
size_t getCols() const
Get the number of columns.
void setValueAsString(size_t i, size_t j, const std::string &_sValue)
This member function sets the data, which is passed as a string, to the table. If the data is not a n...
size_t getLines() const
Get the number of lines.
mu::value_type getValue(size_t i, size_t j) const
Getter function for the value of the selected cell.
bool deleteLines(size_t nPos=0, size_t nNum=1)
This member function deletes lines at the desired position.
bool appendCols(size_t nNum=1)
This member function appends columns.
void setHeadPart(size_t i, size_t part, const std::string &_sHead)
Setter function for the selected column headline and the selected part of the headline (split using l...
TableColumn * getColumn(size_t j) const
Returns a copy of the internal column array or a nullptr, if the column does not exist or is empty.
A class to simplify the access to different types of grid cell coords. Especially useful in the conte...
const wxGridCellsExtent & getExtent() const
Get the maximal needed enclosing box in terms of wxGridCellCoordinates.
bool contains(const wxGridCellCoords &cell) const
Does this wxGridCellCoordsContainer contain the passed coordinates?
MUP_BASETYPE value_type
The numeric datatype used by the parser.
bool isnan(const value_type &v)
std::vector< double > imag(const std::vector< value_type > &vVec)
virtual bool isValid(int elem) const =0
std::string toString(int)
Converts an integer to a string without the Settings bloat.
A simple structure to define the needed grid space to enclose all cells contained in the wxGridCellCo...
wxGridCellCoords m_topleft
wxGridCellCoords m_bottomright