An iterator class for GNet::LineBuffer. More...
#include <glinebuffer.h>
Public Member Functions | |
LineBufferIterator (LineBuffer &) | |
Constructor. More... | |
~LineBufferIterator () | |
Destructor. More... | |
bool | more () const |
Returns true if there is a line() to be had. More... | |
const std::string & | line () |
Returns the current line and increments the iterator. More... | |
An iterator class for GNet::LineBuffer.
Use of this class is optional but it may provide some performance improvement. You are not allowed to add() more data to the underlying line buffer while iterating.
Definition at line 112 of file glinebuffer.h.
|
inlineexplicit |
Constructor.
Definition at line 139 of file glinebuffer.h.
|
inline |
Destructor.
Definition at line 148 of file glinebuffer.h.
const std::string & GNet::LineBufferIterator::line | ( | ) |
Returns the current line and increments the iterator.
Precondition: more()
Definition at line 143 of file glinebuffer.cpp.
Referenced by GNet::BufferedServerPeer::onData().
bool GNet::LineBufferIterator::more | ( | ) | const |
Returns true if there is a line() to be had.
Definition at line 138 of file glinebuffer.cpp.
Referenced by GNet::BufferedServerPeer::onData().