Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

dami::io::WindowedReader Class Reference

Set a window on the buffer. More...

#include <io_decorators.h>

Inheritance diagram for dami::io::WindowedReader:

ID3_Reader List of all members.

Public Methods

 WindowedReader (ID3_Reader &reader)
 WindowedReader (ID3_Reader &reader, size_type size)
 WindowedReader (ID3_Reader &reader, pos_type beg, size_type size)
void setWindow (pos_type beg, size_type size)
pos_type setBeg (pos_type)
pos_type setCur (pos_type cur)
 Set the value of the current position for reading.

pos_type setEnd (pos_type)
pos_type getCur ()
 Return the current position in the reader.

pos_type getBeg ()
 Return the beginning position in the reader.

pos_type getEnd ()
 Return the ending position in the reader.

bool inWindow ()
int_type readChar ()
 Read a single character and advance the internal position.

int_type peekChar ()
 Return the next character to be read without advancing the internal position.

size_type readChars (char_type buf[], size_type len)
 Read up to len characters into buf and advance the internal position accordingly.

size_type readChars (char buf[], size_type len)
void close ()
 Close the reader.


Detailed Description

Set a window on the buffer.

Characters can only be read within this window.

Definition at line 43 of file io_decorators.h.


Constructor & Destructor Documentation

dami::io::WindowedReader::WindowedReader ID3_Reader   reader [inline, explicit]
 

Definition at line 54 of file io_decorators.h.

dami::io::WindowedReader::WindowedReader ID3_Reader   reader,
size_type    size
[inline]
 

Definition at line 57 of file io_decorators.h.

dami::io::WindowedReader::WindowedReader ID3_Reader   reader,
pos_type    beg,
size_type    size
[inline]
 

Definition at line 61 of file io_decorators.h.


Member Function Documentation

void dami::io::WindowedReader::close   [inline, virtual]
 

Close the reader.

Any further actions on the reader should fail.

Implements ID3_Reader.

Definition at line 89 of file io_decorators.h.

pos_type dami::io::WindowedReader::getBeg   [inline, virtual]
 

Return the beginning position in the reader.

Reimplemented from ID3_Reader.

Definition at line 75 of file io_decorators.h.

Referenced by readChar(), and setEnd().

pos_type dami::io::WindowedReader::getCur   [inline, virtual]
 

Return the current position in the reader.

Implements ID3_Reader.

Definition at line 74 of file io_decorators.h.

References ID3_Reader::getCur().

Referenced by readChars(), and setWindow().

pos_type dami::io::WindowedReader::getEnd   [inline, virtual]
 

Return the ending position in the reader.

Reimplemented from ID3_Reader.

Definition at line 76 of file io_decorators.h.

Referenced by readChar(), setBeg(), and setWindow().

bool dami::io::WindowedReader::inWindow   [inline]
 

Definition at line 78 of file io_decorators.h.

Referenced by peekChar(), readChar(), and readChars().

ID3_Reader::int_type io::WindowedReader::peekChar   [virtual]
 

Return the next character to be read without advancing the internal position.

Returns END_OF_READER if there isn't a character to read.

Implements ID3_Reader.

Definition at line 126 of file io_decorators.cpp.

References ID3_Reader::END_OF_READER, ID3_Reader::int_type, inWindow(), and ID3_Reader::peekChar().

ID3_Reader::int_type io::WindowedReader::readChar   [virtual]
 

Read a single character and advance the internal position.

Note that the interal position may advance more than one byte for a single character read. Returns END_OF_READER if there isn't a character to read.

Reimplemented from ID3_Reader.

Definition at line 110 of file io_decorators.cpp.

References ID3_Reader::END_OF_READER, getBeg(), getEnd(), ID3_Reader::int_type, inWindow(), and ID3_Reader::readChar().

size_type dami::io::WindowedReader::readChars char    buf[],
size_type    len
[inline, virtual]
 

Reimplemented from ID3_Reader.

Definition at line 84 of file io_decorators.h.

ID3_Reader::size_type io::WindowedReader::readChars char_type    buf[],
size_type    len
[virtual]
 

Read up to len characters into buf and advance the internal position accordingly.

Returns the number of characters read into buf. Note that the value returned may be less than the number of bytes that the internal position advances, due to multi-byte characters.

Implements ID3_Reader.

Definition at line 136 of file io_decorators.cpp.

References getCur(), inWindow(), ID3_Reader::pos_type, ID3_Reader::readChars(), and ID3_Reader::size_type.

ID3_Reader::pos_type io::WindowedReader::setBeg pos_type   
 

Definition at line 69 of file io_decorators.cpp.

References ID3_Reader::getBeg(), getEnd(), and ID3_Reader::pos_type.

Referenced by setWindow().

pos_type dami::io::WindowedReader::setCur pos_type    cur [inline, virtual]
 

Set the value of the current position for reading.

Implements ID3_Reader.

Definition at line 68 of file io_decorators.h.

References ID3_Reader::setCur().

Referenced by setWindow().

ID3_Reader::pos_type io::WindowedReader::setEnd pos_type   
 

Definition at line 90 of file io_decorators.cpp.

References getBeg(), ID3_Reader::getEnd(), and ID3_Reader::pos_type.

Referenced by setWindow().

void io::WindowedReader::setWindow pos_type    beg,
size_type    size
 

Definition at line 38 of file io_decorators.cpp.

References getCur(), getEnd(), ID3_Reader::getEnd(), ID3_Reader::pos_type, setBeg(), setCur(), setEnd(), and ID3_Reader::skipChars().


The documentation for this class was generated from the following files:
Generated on Thu Jan 23 04:46:21 2003 for id3lib by doxygen1.2.18