InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | List of all members
irc::sepstream Class Reference

#include <hashcomp.h>

Inheritance diagram for irc::sepstream:
irc::commasepstream irc::spacesepstream

Public Member Functions

 sepstream (const std::string &source, char seperator)
 
virtual ~sepstream ()
 
virtual bool GetToken (std::string &token)
 
virtual const std::string GetRemaining ()
 
virtual bool StreamEnd ()
 

Detailed Description

irc::sepstream allows for splitting token seperated lists. Each successive call to sepstream::GetToken() returns the next token, until none remain, at which point the method returns an empty string.

Constructor & Destructor Documentation

irc::sepstream::sepstream ( const std::string &  source,
char  seperator 
)

Create a sepstream and fill it with the provided data

irc::sepstream::~sepstream ( )
virtual

Destructor

Member Function Documentation

const std::string irc::sepstream::GetRemaining ( )
virtual

Fetch the entire remaining stream, without tokenizing

Returns
The remaining part of the stream
bool irc::sepstream::GetToken ( std::string &  token)
virtual

Fetch the next token from the stream

Parameters
tokenThe next token from the stream is placed here
Returns
True if tokens still remain, false if there are none left
bool irc::sepstream::StreamEnd ( )
virtual

Returns true if the end of the stream has been reached

Returns
True if the end of the stream has been reached, otherwise false

The documentation for this class was generated from the following files: