Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Project 2 / src / Models / CellString.h
diff options
context:
space:
mode:
1 files changed, 25 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Project 2/src/Models/CellString.h25
diff --git a/Year 1/Object-oriented Programming/Project 2/src/Models/CellString.h b/Year 1/Object-oriented Programming/Project 2/src/Models/CellString.h
new file mode 100644
index 0000000..788aa4c
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Project 2/src/Models/CellString.h
@@ -0,0 +1,25 @@
+#ifndef HEADER_CELLSTRING
+#define HEADER_CELLSTRING
+
+/*! \file CellString.h
+ * \brief Stores the declaration of class CellString
+ */
+
+#include "Cell.h"
+
+/*! \brief A table cell which contains a String value
+ */
+class CellString : public Cell {
+ String value;
+
+public:
+ CellString() = default;
+ CellString(const char* str);
+
+ double getNumeralValue() const override;
+ String getValueForPrint() const override;
+ void parseAndSetValue(const char* str) override;
+ void writeToFile(std::ofstream& file) override;
+};
+
+#endif