Public Member Functions | List of all members
GNet::LineBufferIterator Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

GNet::LineBufferIterator::LineBufferIterator ( LineBuffer b)
inlineexplicit

Constructor.

Definition at line 139 of file glinebuffer.h.

GNet::LineBufferIterator::~LineBufferIterator ( )
inline

Destructor.

Definition at line 148 of file glinebuffer.h.

Member Function Documentation

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().


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