Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ID3_Reader Class Reference

#include <reader.h>

Inheritance diagram for ID3_Reader:

dami::io::BStringReader dami::io::CharReader dami::io::StringReader dami::io::WindowedReader ID3_IStreamReader ID3_MemoryReader dami::io::LineFeedReader dami::io::UnsyncedReader ID3_IFStreamReader dami::io::CompressedReader List of all members.

Public Types

typedef uint32 size_type
typedef uint8 char_type
typedef uint32 pos_type
typedef int32 off_type
typedef int16 int_type

Public Member Functions

virtual void close ()=0
 Close the reader.
virtual pos_type getBeg ()
 Return the beginning position in the reader.
virtual pos_type getEnd ()
 Return the ending position in the reader.
virtual pos_type getCur ()=0
 Return the current position in the reader.
virtual pos_type setCur (pos_type pos)=0
 Set the value of the current position for reading.
virtual int_type readChar ()
 Read a single character and advance the internal position.
virtual int_type peekChar ()=0
 Return the next character to be read without advancing the internal position.
virtual size_type readChars (char_type buf[], size_type len)=0
 Read up to len characters into buf and advance the internal position accordingly.
virtual size_type readChars (char buf[], size_type len)
virtual size_type skipChars (size_type len)
 Skip up to len chars in the stream and advance the internal position accordingly.
virtual size_type remainingBytes ()
virtual bool atEnd ()

Static Public Attributes

const int_type END_OF_READER = -1

Member Typedef Documentation

typedef uint8 ID3_Reader::char_type
 

Definition at line 37 of file reader.h.

Referenced by readChar(), and skipChars().

typedef int16 ID3_Reader::int_type
 

Definition at line 40 of file reader.h.

Referenced by readChar().

typedef int32 ID3_Reader::off_type
 

Definition at line 39 of file reader.h.

typedef uint32 ID3_Reader::pos_type
 

Definition at line 38 of file reader.h.

Referenced by getBeg(), getEnd(), and remainingBytes().

typedef uint32 ID3_Reader::size_type
 

Definition at line 36 of file reader.h.

Referenced by readChars(), remainingBytes(), and skipChars().


Member Function Documentation

virtual bool ID3_Reader::atEnd  )  [inline, virtual]
 

Reimplemented in dami::io::StringReader, and dami::io::BStringReader.

Definition at line 125 of file reader.h.

References getCur(), and getEnd().

Referenced by ID3_FieldImpl::ParseInteger(), ID3_TagImpl::ParseReader(), ID3_FieldImpl::ParseText(), ID3_MemoryReader::peekChar(), dami::io::BStringReader::peekChar(), dami::io::StringReader::peekChar(), dami::io::UnsyncedReader::readChar(), dami::io::LineFeedReader::readChar(), readChar(), dami::io::CharReader::readChars(), and skipChars().

virtual void ID3_Reader::close  )  [pure virtual]
 

Close the reader.

Any further actions on the reader should fail.

Implemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, ID3_IFStreamReader, and ID3_MemoryReader.

virtual pos_type ID3_Reader::getBeg  )  [inline, virtual]
 

Return the beginning position in the reader.

Reimplemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Definition at line 48 of file reader.h.

References pos_type.

Referenced by ID3_FrameImpl::Parse(), ID3_FieldImpl::ParseInteger(), ID3_FieldImpl::ParseText(), and dami::io::WindowedReader::setBeg().

virtual pos_type ID3_Reader::getCur  )  [pure virtual]
 

Return the current position in the reader.

Implemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Referenced by atEnd(), ID3_IStreamReader::getEnd(), Mp3Info::Parse(), ID3_FrameHeader::Parse(), ID3_FrameImpl::Parse(), ID3_TagHeader::ParseExtended(), ID3_FieldImpl::ParseInteger(), ID3_FieldImpl::ParseText(), remainingBytes(), and ID3_MemoryReader::setCur().

virtual pos_type ID3_Reader::getEnd  )  [inline, virtual]
 

Return the ending position in the reader.

Reimplemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Definition at line 51 of file reader.h.

References pos_type.

Referenced by atEnd(), ID3_FrameHeader::Parse(), ID3_FrameImpl::Parse(), ID3_FieldImpl::ParseInteger(), ID3_TagImpl::ParseReader(), ID3_FieldImpl::ParseText(), remainingBytes(), ID3_MemoryReader::setCur(), dami::io::BStringReader::setCur(), dami::io::StringReader::setCur(), dami::io::WindowedReader::setCur(), dami::io::WindowedReader::setEnd(), and dami::io::WindowedReader::setWindow().

virtual int_type ID3_Reader::peekChar  )  [pure 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.

Implemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Referenced by dami::io::WindowedReader::peekChar().

virtual int_type ID3_Reader::readChar  )  [inline, 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 in dami::io::WindowedReader, dami::io::LineFeedReader, and dami::io::UnsyncedReader.

Definition at line 65 of file reader.h.

References atEnd(), char_type, int_type, and readChars().

Referenced by ID3_TagImpl::IsV2Tag(), ID3_TagHeader::Parse(), ID3_TagHeader::ParseExtended(), dami::io::UnsyncedReader::readChar(), dami::io::LineFeedReader::readChar(), dami::io::WindowedReader::readChar(), and dami::io::CharReader::readChars().

virtual size_type ID3_Reader::readChars char  buf[],
size_type  len
[inline, virtual]
 

Reimplemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Definition at line 88 of file reader.h.

References readChars(), and size_type.

virtual size_type ID3_Reader::readChars char_type  buf[],
size_type  len
[pure 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.

Implemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Referenced by Mp3Info::Parse(), ID3_TagHeader::Parse(), readChar(), ID3_MemoryReader::readChars(), ID3_IStreamReader::readChars(), readChars(), dami::io::BStringReader::readChars(), dami::io::StringReader::readChars(), dami::io::CharReader::readChars(), dami::io::WindowedReader::readChars(), and skipChars().

virtual size_type ID3_Reader::remainingBytes  )  [inline, virtual]
 

Definition at line 109 of file reader.h.

References getCur(), getEnd(), pos_type, and size_type.

Referenced by dami::io::CompressedReader::CompressedReader(), and ID3_FieldImpl::ParseText().

virtual pos_type ID3_Reader::setCur pos_type  pos  )  [pure virtual]
 

Set the value of the current position for reading.

Implemented in dami::io::WindowedReader, dami::io::CharReader, dami::io::StringReader, dami::io::BStringReader, ID3_IStreamReader, and ID3_MemoryReader.

Referenced by ID3_IStreamReader::getEnd(), Mp3Info::Parse(), and ID3_TagHeader::ParseExtended().

virtual size_type ID3_Reader::skipChars size_type  len  )  [inline, virtual]
 

Skip up to len chars in the stream and advance the internal position accordingly.

Returns the number of characters actually skipped (may be less than requested).

Reimplemented in dami::io::StringReader, and dami::io::BStringReader.

Definition at line 97 of file reader.h.

References atEnd(), char_type, readChars(), and size_type.

Referenced by dami::io::WindowedReader::setWindow().


Member Data Documentation

const ID3_Reader::int_type ID3_Reader::END_OF_READER = -1 [static]
 

Definition at line 34 of file io.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Aug 16 20:49:12 2005 for id3lib by  doxygen 1.3.9.1