28 #ifndef _ID3LIB_READER_H_
29 #define _ID3LIB_READER_H_
45 virtual void close() = 0;
54 virtual pos_type getCur() = 0;
58 virtual pos_type setCur(pos_type pos) = 0;
72 this->readChars(&ch, 1);
80 virtual int_type peekChar() = 0;
87 virtual size_type readChars(char_type buf[], size_type len) = 0;
90 return this->readChars(reinterpret_cast<char_type *>(buf), len);
102 while (!this->atEnd() && remaining > 0)
104 remaining -= this->readChars(bytes, (remaining < SIZE ? remaining : SIZE));
106 return len - remaining;
111 pos_type end = this->getEnd(), cur = this->getCur();
125 virtual bool atEnd() {
return this->getCur() >= this->getEnd(); }
virtual pos_type getBeg()
Return the beginning position in the reader.
static const int_type END_OF_READER
virtual int_type readChar()
Read a single character and advance the internal position.
virtual pos_type getEnd()
Return the ending position in the reader.
virtual size_type remainingBytes()
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. ...