summaryrefslogtreecommitdiff
path: root/src/core/common/CharReader.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 19:49:17 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-02-08 19:49:17 +0100
commit9ef316ed4ea8542973d272fa9c7b4c6804b28144 (patch)
tree1e884c61b5915f913c8db404cc9137bbe8eae01c /src/core/common/CharReader.hpp
parent05e5a4ab340d0f9f3490e7db9c8e42f70cc471da (diff)
parentf6e7859a835375c25226719a46df99ec11037599 (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/CharReader.hpp')
-rw-r--r--src/core/common/CharReader.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/common/CharReader.hpp b/src/core/common/CharReader.hpp
index cbd7b74..cbfeaf2 100644
--- a/src/core/common/CharReader.hpp
+++ b/src/core/common/CharReader.hpp
@@ -302,6 +302,15 @@ public:
ssize_t moveCursor(CursorId cursor, ssize_t relativeOffs);
/**
+ * Moves the cursor to the given position.
+ *
+ * @param cursor is the cursor that should be moved.
+ * @param offs is the offset to which the cursor should be moved.
+ * @return the actual location that was reached.
+ */
+ size_t seekCursor(CursorId cursor, size_t offs);
+
+ /**
* Returns the current byte offset of the given cursor relative to the
* beginning of the stream.
*
@@ -533,6 +542,17 @@ public:
size_t seek(size_t requestedOffset);
/**
+ * Moves the peek cursor to the requested offset. Returns the offse that wa
+ * actually reached.
+ *
+ * @param requestedOffset is the requested offset. This offset may no longer
+ * be reachable by the CharReader.
+ * @return the actually reached offset. The operation was successful, if
+ * the requested and reached offset are equal.
+ */
+ size_t seekPeekCursor(size_t requestedOffset);
+
+ /**
* Returns true if there are no more characters as the stream was closed.
*
* @return true if there is no more data.