FMI Table
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |
Cell.h
Go to the documentation of this file.
1#ifndef HEADER_CELL
2#define HEADER_CELL
3
8#include <fstream>
9#include "../Generic/String/String.h"
10
13class Cell {
14public:
16 virtual double getNumeralValue() const = 0;
18 virtual String getValueForPrint() const = 0;
20 virtual void parseAndSetValue(const char* str) = 0;
22 virtual void writeToFile(std::ofstream& file) = 0;
23
24 virtual ~Cell() = default;
25};
26
27#endif
Fully abstract class that represents a cell in the table.
Definition: Cell.h:13
virtual double getNumeralValue() const =0
Returns the value of the cell as a double-precision floating point number.
virtual void writeToFile(std::ofstream &file)=0
Writes value to a text file.
virtual void parseAndSetValue(const char *str)=0
Parses given C-style string and stores value.
virtual String getValueForPrint() const =0
Returns the value of the cell as a String.
A dynamically-allocated C-style string with extra features.
Definition: String.h:17