- /** Fetch the next token from the stream as a std::string
- * @param token The next token available, or an empty string if none remain
- * @return True if tokens are left to be read, false if the last token was just retrieved.
- */
- bool GetToken(std::string &token);
+ /** The current position within the message. */
+ size_t position;
+
+ public:
+ /** Create a tokenstream and fill it with the provided data. */
+ tokenstream(const std::string& msg, size_t start = 0);