summaryrefslogtreecommitdiff
path: root/src/core/BufferedCharReader.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-05 16:08:34 +0100
committerAndreas Stöckel <andreas@somweyr.de>2014-12-05 16:08:34 +0100
commite06e7ae19851acf5e397f579d6c8459e87086d30 (patch)
tree2140f3d79239d6f0ebd5c08f1fb48b327586249e /src/core/BufferedCharReader.hpp
parentbf59bc2edbb1f3f4d12bfbd8ed2663fbbb1900c0 (diff)
added string reading functions of the Reader class
Diffstat (limited to 'src/core/BufferedCharReader.hpp')
-rw-r--r--src/core/BufferedCharReader.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/core/BufferedCharReader.hpp b/src/core/BufferedCharReader.hpp
index bd19d4a..e7f3186 100644
--- a/src/core/BufferedCharReader.hpp
+++ b/src/core/BufferedCharReader.hpp
@@ -172,7 +172,6 @@ public:
*/
BufferedCharReader(int line = 1, int column = 1);
-
/**
* Constructor of the buffered char reader class with a string as input.
*
@@ -180,7 +179,14 @@ public:
* @param line is the start line.
* @param column is the start column.
*/
- BufferedCharReader(const std::string &str, int line = 1, int column = 1);
+ BufferedCharReader(const std::string &str, int line, int column);
+
+ /**
+ * Constructor of the buffered char reader class with a string as input.
+ *
+ * @param str is a string containing the input data.
+ */
+ BufferedCharReader(const std::string &str);
/**
* Constructor of the buffered char reader class with a string as input.
@@ -222,6 +228,14 @@ public:
void consumePeek();
/**
+ * Moves the read cursor to the next non-whitespace character. Returns
+ * false, if the end of the stream was reached.
+ *
+ * @return false if the end of the stream was reached, false othrwise.
+ */
+ bool consumeWhitespace();
+
+ /**
* Resets the peek pointer to the "read" pointer.
*/
void resetPeek();