Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models
diff options
context:
space:
mode:
Commit202a4e89a9d235d6760b4c9cf30aa5a717f0424c (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-06-14 14:54:39 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-06-14 14:54:39 +0300
Files9493ceee468eba943541748ff6f99a6389bb4051 /src/Models
FMI-OOP-P2_Tables-202a4e89a9d235d6760b4c9cf30aa5a717f0424c.tar
FMI-OOP-P2_Tables-202a4e89a9d235d6760b4c9cf30aa5a717f0424c.tar.gz
FMI-OOP-P2_Tables-202a4e89a9d235d6760b4c9cf30aa5a717f0424c.zip
Parent9bbfd92a6494cf8a80571e3659a3df420fc35b01 (diff)
Autocommit at 14.06.2022 @ 14:54
4 files changed, 20 insertions, 1 deletions
-rw-r--r--src/Models/Cell.h2
-rw-r--r--src/Models/CellDouble.cpp3
-rw-r--r--src/Models/CellDouble.h8
-rw-r--r--src/Models/CellFormula.h8
diff --git a/src/Models/Cell.h b/src/Models/Cell.h
index 20d5ec6..9abc639 100644
--- a/src/Models/Cell.h
+++ b/src/Models/Cell.h
@@ -8,7 +8,7 @@
#include <fstream>
#include "../Generic/String/String.h"
-/*! \brief Generic class for each cell in a table
+/*! \brief Fully abstract class that represents a cell in the table
*/
class Cell {
public:
diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp
index 538bf11..660fc88 100644
--- a/src/Models/CellDouble.cpp
+++ b/src/Models/CellDouble.cpp
@@ -5,6 +5,9 @@ CellDouble::CellDouble(double value) {
this->value = value;
}
+/*!
+ * Accepts a C-style string in the form "<+/-><digits>.<digits>"
+ */
CellDouble::CellDouble(const char* str) {
value = 0;
bool negative = *str == '-';
diff --git a/src/Models/CellDouble.h b/src/Models/CellDouble.h
index 5f7cc47..0be4edf 100644
--- a/src/Models/CellDouble.h
+++ b/src/Models/CellDouble.h
@@ -1,8 +1,16 @@
#ifndef HEADER_CELLDOUBLE
#define HEADER_CELLDOUBLE
+/*! \file Cell.h
+ * \brief Stores the declaration of class CellDouble
+ */
+
#include "Cell.h"
+/*! \brief A table cell which contains a double-precision floating point number
+ *
+ * Implements the Cell class by implementing a value of type double.
+ */
class CellDouble : public Cell {
double value;
diff --git a/src/Models/CellFormula.h b/src/Models/CellFormula.h
index 7833426..411de84 100644
--- a/src/Models/CellFormula.h
+++ b/src/Models/CellFormula.h
@@ -1,11 +1,19 @@
#ifndef HEADER_CELLFORMULA
#define HEADER_CELLFORMULA
+/*! \file CellFormula.h
+ * \brief Stores the declaration of class CellFormula
+ */
+
#include "Cell.h"
#include "CellDouble.h"
#include "../Generic/List/List.hpp"
#include "../Generic/Pair/Pair.hpp"
+/*! \brief A table cell which contains a formula
+ *
+ * Implements the Cell class by storing a formula as a String and in a dynamic List
+ */
class CellFormula : public Cell {
const List<List<Cell*>>* tableCells;
List<CellDouble> localCells;