diff options
Autocommit at 28.05.2022 @ 16:49
3 files changed, 12 insertions, 9 deletions
| -rw-r--r-- | src/Models/CellDouble.cpp | 8 | ||||
| -rw-r--r-- | src/Models/Table.cpp | 5 | ||||
| -rw-r--r-- | src/Models/Table.h | 8 |
diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp index a823419..27713f5 100644 --- a/src/Models/CellDouble.cpp +++ b/src/Models/CellDouble.cpp @@ -1,14 +1,6 @@ #include "CellDouble.h" #include <cstring> -CellDouble::CellDouble(int val) { - value = val; -} - -CellDouble::CellDouble(const String& str) { - value = atof(str.get_cstr()); -} - double CellDouble::getNumeralValue() { return value; } diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp new file mode 100644 index 0000000..1d98f5b --- /dev/null +++ b/src/Models/Table.cpp @@ -0,0 +1,5 @@ +#include "Table.h" + +Table::Table(unsigned rows, unsigned cols) { + cells = List<List<Cell>>(rows); +} diff --git a/src/Models/Table.h b/src/Models/Table.h index d53ecbb..5ed5dd9 100644 --- a/src/Models/Table.h +++ b/src/Models/Table.h @@ -5,8 +5,14 @@ #include "../Generic/List/List.hpp" class Table { - List<List<Cell>> cells; + Cell** cells; List<List<Cell>> constantsCells; + +public: + Table(unsigned rows, unsigned cols); + + void putCell(unsigned row, unsigned col, const char* rawValue); + String getAllCells(); }; #endif |
