GNet::LineBufferIterator Class Reference

An iterator class for GNet::LineBuffer. More...

#include <glinebuffer.h>

List of all members.

Public Member Functions

 LineBufferIterator (LineBuffer &)
 ~LineBufferIterator ()
bool more () const
 Returns true if there is a line() to be had.
const std::string & line ()
 Returns the current line and increments the iterator.

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  )  [inline, explicit]


Definition at line 139 of file glinebuffer.h.

References GNet::LineBuffer::lock().

GNet::LineBufferIterator::~LineBufferIterator (  )  [inline]


Definition at line 148 of file glinebuffer.h.

References GNet::LineBuffer::unlock().

Member Function Documentation

bool GNet::LineBufferIterator::more (  )  const

Returns true if there is a line() to be had.

Definition at line 138 of file glinebuffer.cpp.

References GNet::LineBuffer::m_p.

Referenced by GNet::BufferedServerPeer::onData().

const std::string & GNet::LineBufferIterator::line (  ) 

Returns the current line and increments the iterator.

Precondition: more()

Definition at line 143 of file glinebuffer.cpp.

References GNet::LineBuffer::m_current, GNet::LineBuffer::m_eol, GNet::LineBuffer::m_eol_length, GNet::LineBuffer::m_p, and GNet::LineBuffer::m_store.

Referenced by GNet::BufferedServerPeer::onData().

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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5