Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models
diff options
context:
space:
mode:
Commit0154b6953d8c26bb7fc9a9314d9bc02c022547a3 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-06-14 07:53:36 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-06-14 07:53:36 +0300
Files2dd763cbf51e39c370f9b14fbd4ba541ebf78789 /src/Models
FMI-OOP-P2_Tables-0154b6953d8c26bb7fc9a9314d9bc02c022547a3.tar
FMI-OOP-P2_Tables-0154b6953d8c26bb7fc9a9314d9bc02c022547a3.tar.gz
FMI-OOP-P2_Tables-0154b6953d8c26bb7fc9a9314d9bc02c022547a3.zip
Parent8ac9daf2c9d82aacba01de8839a7eef374535b24 (diff)
Autocommit at 14.06.2022 @ 07:53
3 files changed, 5 insertions, 1 deletions
-rw-r--r--src/Models/CellDouble.cpp2
-rw-r--r--src/Models/CellInt.cpp2
-rw-r--r--src/Models/Table.cpp2
diff --git a/src/Models/CellDouble.cpp b/src/Models/CellDouble.cpp
index e19be3b..675791e 100644
--- a/src/Models/CellDouble.cpp
+++ b/src/Models/CellDouble.cpp
@@ -5,7 +5,9 @@ CellDouble::CellDouble(double value) {
this->value = value;
}
+#include <iostream>
CellDouble::CellDouble(const char* str) {
+ std::cout << "Double: " << str << std::endl;
value = 0;
bool negative = *str == '-';
if (*str == '-' || *str == '+') str++;
diff --git a/src/Models/CellInt.cpp b/src/Models/CellInt.cpp
index a20c5ed..37283e4 100644
--- a/src/Models/CellInt.cpp
+++ b/src/Models/CellInt.cpp
@@ -5,7 +5,9 @@ CellInt::CellInt(int value) {
this->value = value;
}
+#include <iostream>
CellInt::CellInt(const char* str) {
+ std::cout << "Int: " << str << std::endl;
value = 0;
bool negative = *str == '-';
if (*str == '-' || *str == '+') str++;
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp
index f1201f2..cfd8ee1 100644
--- a/src/Models/Table.cpp
+++ b/src/Models/Table.cpp
@@ -166,7 +166,7 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) {
List<String> Table::getAllCells() const {
List<String> toRet;
for (unsigned i = 0; i < cells.get_count(); i++) {
- for (unsigned j = 0; j < cells[i].get_length(); j++) {
+ for (unsigned j = 0; j < cells[i].get_count(); j++) {
std::cout << i << ' ' << j << std::endl;
toRet.add(cells[i][j]->getValueForPrint());
}