diff options
| Commit | 1f5f431447ef530b2b7e5e3140fcafe9379f09cb (patch) | |
|---|---|---|
| Author | 2022-05-28 18:14:23 +0300 | |
| Committer | 2022-05-28 18:14:23 +0300 | |
| Files | 8986a91fbfd8f5aa0b412fb8f6bf2d91397df679 /src | |
| FMI-OOP-P2_Tables-1f5f431447ef530b2b7e5e3140fcafe9379f09cb.tar FMI-OOP-P2_Tables-1f5f431447ef530b2b7e5e3140fcafe9379f09cb.tar.gz FMI-OOP-P2_Tables-1f5f431447ef530b2b7e5e3140fcafe9379f09cb.zip | ||
| Parent | b242dc2a66fdae9e9c201631e056f117fbf88972 (diff) | |
Autocommit at 28.05.2022 @ 18:14
3 files changed, 10 insertions, 0 deletions
| -rw-r--r-- | src/Models/CellDouble.cpp | 4 | ||||
| -rw-r--r-- | src/Models/CellDouble.h | 1 | ||||
| -rw-r--r-- | src/Models/Table.cpp | 5 |
diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp index 27713f5..4f4f769 100644 --- a/src/Models/CellDouble.cpp +++ b/src/Models/CellDouble.cpp @@ -1,6 +1,10 @@ #include "CellDouble.h" #include <cstring> +CellDouble::CellDouble(double value) { + this->value = value; +} + double CellDouble::getNumeralValue() { return value; } diff --git a/src/Models/CellDouble.h b/src/Models/CellDouble.h index 24d4073..6396089 100644 --- a/src/Models/CellDouble.h +++ b/src/Models/CellDouble.h @@ -8,6 +8,7 @@ class CellDouble : public Cell { public: CellDouble() = default; + CellDouble(double value); double getNumeralValue() override; String getValueForPrint() override; diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 19bf154..602b424 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -1,4 +1,8 @@ #include "Table.h" +#include "CellDouble.h" +#include "CellInt.h" +#include "CellString.h" +#include "CellFormula.h" #include <cstring> Table::Table(unsigned rows, unsigned cols) { @@ -13,4 +17,5 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { Cell* newCell; if (doubleParse - intParse > 0.00001) + newCell = new CellDouble(doubleParse); } |
