Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

lfc::PutbackTextInput Class Reference

Inheritance diagram for lfc::PutbackTextInput::

lfc::Object lfc::_InputFilter< char, char > lfc::_Input< char > lfc::_Server List of all members.

Public Methods

 PutbackTextInput (_Input< char > &inputBase, long maxPutbackCnt=DEFAULT_PUTBACK_CNT)
 ~PutbackTextInput () throw ()
virtual long read (char *buffer, long count, bool bWaitAll=true)
 Reads from the stream. More...

virtual bool hasMore () const
 Indicates whether the stream has more elements left in it. More...

virtual char pop ()
 
Returns:
a single character from the stream.
More...


virtual void resetInput ()
 Resets this stream. More...

virtual long maxPutbackCount () const throw ()
 
Returns:
the maximum number of characters that can be put back.
More...


virtual void putback (long count)
 This unreads the given number of characters. More...


Static Public Attributes

const long DEFAULT_PUTBACK_CNT = 256L

Protected Methods

virtual void readNewBuffer (bool bWaitAll)
 Loads a new half-buffer. More...


Protected Attributes

char * m_buffer
 The buffer. More...

long m_bufferPosition
 the current position in the buffer. More...

long m_bufferSize
 the size of the entire buffer. More...

long m_marker1
 The marker positions. More...

long m_marker2
 The marker positions. More...

long m_maxPutbackCnt
 the maximum putback count/half-buffer size. More...

long m_putbackCnt
 how much has been putback. More...

bool m_readTwice
 Indicates we've read two half-buffers. More...


Constructor & Destructor Documentation

lfc::PutbackTextInput::PutbackTextInput _Input< char > &    inputBase,
long    maxPutbackCnt = DEFAULT_PUTBACK_CNT
[inline]
 

Parameters:
inputBase  the base input stream
maxPutbackCnt  the maximum putback count

lfc::PutbackTextInput::~PutbackTextInput   throw () [inline]
 


Member Function Documentation

long lfc::PutbackTextInput::read char *    buffer,
long    count,
bool    bWaitAll = true
[virtual]
 

Reads from the stream.

Parameters:
buffer  the buffer to put the data into
count  the number of bytes to try to read
bWaitAll  whether to wait for everything or not
Returns:
the count of TYPE read

virtual bool lfc::PutbackTextInput::hasMore   const [inline, virtual]
 

Indicates whether the stream has more elements left in it.

Reimplemented from lfc::_Input.

virtual char lfc::PutbackTextInput::pop   [inline, virtual]
 

Returns:
a single character from the stream.

Reimplemented from lfc::_Input.

virtual void lfc::PutbackTextInput::resetInput   [inline, virtual]
 

Resets this stream.

Reimplemented from lfc::_Input.

virtual long lfc::PutbackTextInput::maxPutbackCount   const throw () [inline, virtual]
 

Returns:
the maximum number of characters that can be put back.

void lfc::PutbackTextInput::putback long    count [virtual]
 

This unreads the given number of characters.

Parameters:
count  the number of characters to unread
Exceptions:
PutbackTextException  when the caller attempts to unread too many characters, either by exceeding the number of characters read or by exceeding the maximum putback count

void lfc::PutbackTextInput::readNewBuffer bool    bWaitAll [protected, virtual]
 

Loads a new half-buffer.


Member Data Documentation

const long lfc::PutbackTextInput::DEFAULT_PUTBACK_CNT = 256L [static]
 

char* lfc::PutbackTextInput::m_buffer [protected]
 

The buffer.

long lfc::PutbackTextInput::m_bufferPosition [protected]
 

the current position in the buffer.

long lfc::PutbackTextInput::m_bufferSize [protected]
 

the size of the entire buffer.

long lfc::PutbackTextInput::m_marker1 [protected]
 

The marker positions.

long lfc::PutbackTextInput::m_marker2 [protected]
 

The marker positions.

long lfc::PutbackTextInput::m_maxPutbackCnt [protected]
 

the maximum putback count/half-buffer size.

long lfc::PutbackTextInput::m_putbackCnt [protected]
 

how much has been putback.

bool lfc::PutbackTextInput::m_readTwice [protected]
 

Indicates we've read two half-buffers.


The documentation for this class was generated from the following files:
Generated on Fri Jan 25 03:13:29 2002 for LFC2 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001