FMI Table
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |
CellInt.h
Go to the documentation of this file.
1#ifndef HEADER_CELLINT
2#define HEADER_CELLINT
3
8#include "Cell.h"
9
14class CellInt : public Cell {
15 int value;
16
17public:
18 CellInt() = default;
19 CellInt(int value);
20 CellInt(const char* str);
21
22 double getNumeralValue() const override;
23 String getValueForPrint() const override;
24 void parseAndSetValue(const char* str) override;
25 void writeToFile(std::ofstream& file) override;
26};
27
28#endif
Stores the declaration of class Cell.
A table cell which contains an integer.
Definition: CellInt.h:14
String getValueForPrint() const override
Returns the value of the cell as a String.
Definition: CellInt.cpp:23
void parseAndSetValue(const char *str) override
Parses given C-style string and stores value.
Definition: CellInt.cpp:27
void writeToFile(std::ofstream &file) override
Writes value to a text file.
Definition: CellInt.cpp:31
double getNumeralValue() const override
Returns the value of the cell as a double-precision floating point number.
Definition: CellInt.cpp:19
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