28 #ifndef _ID3LIB_READERS_H_ 29 #define _ID3LIB_READERS_H_ 31 #include "id3/id3lib_streams.h" 51 return this->
readChars(reinterpret_cast<uchar *>(buf), len);
55 _stream.read((
char *)buf, len);
56 return _stream.gcount();
64 _stream.seekg(0, ios::end);
103 this->setBuffer(
NULL, 0);
107 this->setBuffer(buf, size);
111 this->setBuffer(reinterpret_cast<const char_type*>(buf), size);
130 return this->
readChars(reinterpret_cast<char_type *>(buf), len);
154 size_type size = (pos < end) ? pos : end;
ID3_MemoryReader(const char_type *buf, size_type size)
static const int_type END_OF_READER
virtual pos_type getEnd()
Return the ending position in the reader.
virtual void close()
Close the reader.
virtual pos_type getCur()=0
Return the current position in the reader.
virtual pos_type setCur(pos_type pos)
Set the value of the internal position for reading.
virtual pos_type setCur(pos_type pos)=0
Set the value of the current position for reading.
virtual pos_type setCur(pos_type pos)
Set the value of the internal position for reading.
virtual pos_type getCur()
Return the current position in the reader.
virtual size_type readChars(char_type buf[], size_type len)=0
Read up to len characters into buf and advance the internal position accordingly. ...
void setBuffer(const char_type *buf, size_type size)
ID3_IFStreamReader(ifstream &reader)
virtual void close()
Close the reader.
virtual size_type readChars(char buf[], size_type len)
Read up to len chars into buf and advance the internal position accordingly.
virtual pos_type getBeg()
Return the beginning position in the reader.
istream & getReader() const
ID3_IStreamReader(istream &reader)
virtual int_type peekChar()
Return the next character to be read without advancing the internal position.
virtual pos_type getEnd()
Return the ending position in the reader.
virtual pos_type getEnd()
Return the ending position in the reader.
virtual int_type peekChar()
Return the next character to be read without advancing the internal position.
virtual pos_type getBeg()
Return the beginning position in the reader.
virtual size_type readChars(char buf[], size_type len)
Read up to len chars into buf and advance the internal position accordingly.
virtual ~ID3_MemoryReader()
virtual ~ID3_IStreamReader()
ID3_MemoryReader(const char *buf, size_type size)
virtual pos_type getCur()
Return the current position in the reader.
virtual size_type readChars(char_type buf[], size_type len)
Read up to len characters into buf and advance the internal position accordingly. ...
virtual void close()
Close the reader.