id3lib  3.8.3
Public Member Functions | Protected Attributes | List of all members
dami::io::CharReader Class Reference

#include <io_decorators.h>

Inheritance diagram for dami::io::CharReader:
ID3_Reader dami::io::LineFeedReader dami::io::UnsyncedReader

Public Member Functions

 CharReader (ID3_Reader &reader)
 
virtual ~CharReader ()
 
size_type readChars (char_type buf[], size_type len)
 Read len characters into the array buf. More...
 
size_type readChars (char buf[], size_type len)
 
void close ()
 Close the reader. More...
 
int_type peekChar ()
 Return the next character to be read without advancing the internal position. More...
 
pos_type getBeg ()
 Return the beginning position in the reader. More...
 
pos_type getCur ()
 Return the current position in the reader. More...
 
pos_type getEnd ()
 Return the ending position in the reader. More...
 
pos_type setCur (pos_type cur)
 Set the value of the current position for reading. More...
 
- Public Member Functions inherited from ID3_Reader
virtual int_type readChar ()
 Read a single character and advance the internal position. More...
 
virtual size_type skipChars (size_type len)
 Skip up to len chars in the stream and advance the internal position accordingly. More...
 
virtual size_type remainingBytes ()
 
virtual bool atEnd ()
 

Protected Attributes

ID3_Reader_reader
 

Additional Inherited Members

- Public Types inherited from ID3_Reader
typedef uint32 size_type
 
typedef uint8 char_type
 
typedef uint32 pos_type
 
typedef int32 off_type
 
typedef int16 int_type
 
- Static Public Attributes inherited from ID3_Reader
static const int_type END_OF_READER = -1
 

Detailed Description

Definition at line 92 of file io_decorators.h.

Constructor & Destructor Documentation

◆ CharReader()

dami::io::CharReader::CharReader ( ID3_Reader reader)
inline

Definition at line 101 of file io_decorators.h.

◆ ~CharReader()

virtual dami::io::CharReader::~CharReader ( )
inlinevirtual

Definition at line 102 of file io_decorators.h.

Member Function Documentation

◆ close()

void dami::io::CharReader::close ( )
inlinevirtual

Close the reader.

Any further actions on the reader should fail.

Implements ID3_Reader.

Definition at line 115 of file io_decorators.h.

◆ getBeg()

pos_type dami::io::CharReader::getBeg ( )
inlinevirtual

Return the beginning position in the reader.

Reimplemented from ID3_Reader.

Definition at line 118 of file io_decorators.h.

◆ getCur()

pos_type dami::io::CharReader::getCur ( )
inlinevirtual

Return the current position in the reader.

Implements ID3_Reader.

Definition at line 119 of file io_decorators.h.

◆ getEnd()

pos_type dami::io::CharReader::getEnd ( )
inlinevirtual

Return the ending position in the reader.

Reimplemented from ID3_Reader.

Definition at line 120 of file io_decorators.h.

◆ peekChar()

int_type dami::io::CharReader::peekChar ( )
inlinevirtual

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 116 of file io_decorators.h.

◆ readChars() [1/2]

size_type dami::io::CharReader::readChars ( char  buf[],
size_type  len 
)
inlinevirtual

Reimplemented from ID3_Reader.

Definition at line 110 of file io_decorators.h.

◆ readChars() [2/2]

ID3_Reader::size_type io::CharReader::readChars ( char_type  buf[],
size_type  len 
)
virtual

Read len characters into the array buf.

Since the stream needs might have been unsynced, this function copies the characters one at a time.

Implements ID3_Reader.

Definition at line 147 of file io_decorators.cpp.

◆ setCur()

pos_type dami::io::CharReader::setCur ( pos_type  pos)
inlinevirtual

Set the value of the current position for reading.

Implements ID3_Reader.

Definition at line 122 of file io_decorators.h.

Member Data Documentation

◆ _reader

ID3_Reader& dami::io::CharReader::_reader
protected

Definition at line 97 of file io_decorators.h.


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