+ /** Fetch the next token from the stream
+ * @returns The next token is returned, or an empty string if none remain
+ */
+ const std::string GetToken();
+ };
+
+ /** irc::commasepstream allows for splitting comma seperated lists.
+ * Lists passed to irc::commasepstream should not contain spaces
+ * after the commas, or this will be taken to be part of the item
+ * data. Each successive call to commasepstream::GetToken() returns
+ * the next token, until none remain, at which point the method returns
+ * an empty string.
+ */
+ class commasepstream
+ {
+ private:
+ std::string tokens;
+ std::string::iterator last_starting_position;
+ std::string::iterator n;
+ public:
+ /** Create a commasepstream and fill it with the provided data
+ */
+ commasepstream(const std::string &source);
+ ~commasepstream();
+
+ /** Fetch the next token from the stream
+ * @returns The next token is returned, or an empty string if none remain
+ */