Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commite27521a4dfac59efb7525228011ce9d58d7f1152 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-28 15:58:55 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-28 15:58:55 +0300
Files28c1c1df274fdc1edbf9a14157ceb14fa6ce8ec0 /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-e27521a4dfac59efb7525228011ce9d58d7f1152.tar
FMI-OOP-P2_Tables-e27521a4dfac59efb7525228011ce9d58d7f1152.tar.gz
FMI-OOP-P2_Tables-e27521a4dfac59efb7525228011ce9d58d7f1152.zip
Parent4b6cd3e44eca28dfbad22e67cecc8faddcae2e1f (diff)
Autocommit at 28.05.2022 @ 15:58
1 files changed, 13 insertions, 17 deletions
-rw-r--r--src/Models/CellFormula.cpp30
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
index d3c3304..5ed98e8 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -1,21 +1,17 @@
-#ifndef HEADER_CELLFORMULA
-#define HEADER_CELLFORMULA
+#include "CellFormula.h"
+#include <cstring>
-#include "Cell.h"
-#include "../Generic/List/List.hpp"
+String CellFormula::getValueForPrint() {
+ return String() += value;
+}
-class CellFormula : public Cell {
- List<Cell*> referencedCells;
- String rawFormula;
- double value;
+void CellFormula::parseAndSetValue(const char* str) {
+}
-public:
- CellFormula() = default;
+void CellFormula::readFromFile(std::ifstream& file) {
+ file >> rawFormula;
+}
- String getValueForPrint() override;
- void parseAndSetValue(const char* str) override;
- void readFromFile(std::ifstream& file) override;
- void writeToFile(std::ofstream& file) override;
-};
-
-#endif
+void CellFormula::writeToFile(std::ofstream& file) {
+ file << rawFormula;
+}