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