28 #ifndef _ID3LIB_READERS_H_
29 #define _ID3LIB_READERS_H_
31 #include "id3/id3lib_streams.h"
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);
132 virtual size_type
readChars(char_type buf[], size_type len);
154 size_type size = (pos < end) ? pos : end;
virtual void close()
Close the reader.
ID3_IFStreamReader(ifstream &reader)
virtual ~ID3_IStreamReader()
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 int_type peekChar()
Return the next character to be read without advancing the internal position.
istream & getReader() const
virtual pos_type getEnd()
Return the ending position in the reader.
ID3_IStreamReader(istream &reader)
virtual void close()
Close 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 pos_type getCur()
Return the current position in the reader.
virtual pos_type setCur(pos_type pos)
Set the value of the internal position for reading.
virtual int_type peekChar()
Return the next character to be read without advancing the internal position.
virtual pos_type getCur()
Return the current position in the reader.
ID3_MemoryReader(const char_type *buf, size_type size)
virtual pos_type getEnd()
Return the ending 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 pos_type getBeg()
Return the beginning position in the reader.
void setBuffer(const char_type *buf, size_type size)
virtual pos_type setCur(pos_type pos)
Set the value of the internal position for reading.
virtual void close()
Close the reader.
ID3_MemoryReader(const char *buf, size_type size)
virtual pos_type setCur(pos_type pos)=0
Set the value of the current position for reading.
static const int_type END_OF_READER
virtual pos_type getCur()=0
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.
virtual pos_type getEnd()
Return the ending position in the reader.