From 6a42c2a37829f14e312b38f8e254dc7279d5f3cc Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 28 May 2022 16:49:13 +0300 Subject: Autocommit at 28.05.2022 @ 16:49 --- src/Models/CellDouble.cpp | 8 -------- src/Models/Table.cpp | 5 +++++ src/Models/Table.h | 8 +++++++- 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 src/Models/Table.cpp (limited to 'src/Models') 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 -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>(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> cells; + Cell** cells; List> constantsCells; + +public: + Table(unsigned rows, unsigned cols); + + void putCell(unsigned row, unsigned col, const char* rawValue); + String getAllCells(); }; #endif -- cgit v1.3.1-26-gb76a