FMI Table
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |
CellDouble.h
Go to the documentation of this file.
1#ifndef HEADER_CELLDOUBLE
2#define HEADER_CELLDOUBLE
3
8#include "Cell.h"
9
14class CellDouble : public Cell {
15 double value;
16
17public:
18 CellDouble() = default;
19 CellDouble(double value);
20 CellDouble(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 a double-precision floating point number.
Definition: CellDouble.h:14
void writeToFile(std::ofstream &file) override
Writes value to a text file.
Definition: CellDouble.cpp:37
double getNumeralValue() const override
Returns the value of the cell as a double-precision floating point number.
Definition: CellDouble.cpp:25
void parseAndSetValue(const char *str) override
Parses given C-style string and stores value.
Definition: CellDouble.cpp:33
String getValueForPrint() const override
Returns the value of the cell as a String.
Definition: CellDouble.cpp:29
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