Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 10 insertions, 5 deletions
-rw-r--r--src/Generic/List/List.hpp2
-rw-r--r--src/Models/Table.cpp13
diff --git a/src/Generic/List/List.hpp b/src/Generic/List/List.hpp
index c6fd8a1..ba4851c 100644
--- a/src/Generic/List/List.hpp
+++ b/src/Generic/List/List.hpp
@@ -47,6 +47,8 @@ public:
T& operator[](unsigned index);
//! Returns constant reference to element at index
const T& operator[](unsigned index) const;
+ //! Returns raw array of data
+ const T* raw_data() const;
//! Appends elements from other list
List<T>& operator+=(const List<T> other);
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp
index b5638c9..3724d3a 100644
--- a/src/Models/Table.cpp
+++ b/src/Models/Table.cpp
@@ -24,12 +24,14 @@ void W(std::ifstream& in) {
while (in.peek() == ' ') in.get();
}
-void D(std::ifstream& in) {
- while (in.peek() >= '0' && in.peek() <= '9') in.get();
+void D(std::ifstream& in, List<char>& buffer) {
+ while (in.peek() >= '0' && in.peek() <= '9')
+ buffer.add(in.get());
}
-void A(std::ifstream& in) {
- while ((in.peek() >= '#' && in.peek() <= '~') || in.peek() == '!') in.get();
+void A(std::ifstream& in, List<char>& buffer) {
+ while ((in.peek() >= '#' && in.peek() <= '~') || in.peek() == '!')
+ buffer.add(in.get());
}
void Table::readFromFile(std::ifstream& inFile) {
@@ -38,7 +40,8 @@ void Table::readFromFile(std::ifstream& inFile) {
if (inFile.peek() == '"') inFile.get();
if (inFile.peek() == '=') {
-
+ List<char> buffer;
+ A(inFile, buffer);
}
}
}