Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--src/Models/CellFormula.cpp21
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
new file mode 100644
index 0000000..d3c3304
--- /dev/null
+++ b/src/Models/CellFormula.cpp
@@ -0,0 +1,21 @@
+#ifndef HEADER_CELLFORMULA
+#define HEADER_CELLFORMULA
+
+#include "Cell.h"
+#include "../Generic/List/List.hpp"
+
+class CellFormula : public Cell {
+ List<Cell*> referencedCells;
+ String rawFormula;
+ double value;
+
+public:
+ CellFormula() = default;
+
+ String getValueForPrint() override;
+ void parseAndSetValue(const char* str) override;
+ void readFromFile(std::ifstream& file) override;
+ void writeToFile(std::ofstream& file) override;
+};
+
+#endif