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(); }