28#ifndef _ID3LIB_READER_DECORATORS_H_
29#define _ID3LIB_READER_DECORATORS_H_
51 {
return this->
getBeg() <= cur && cur < this->
getEnd(); }
55 : _reader(reader), _beg(reader.
getBeg()), _end(reader.
getEnd()) { ; }
58 : _reader(reader), _beg(reader.
getBeg()), _end(reader.
getEnd())
62 : _reader(reader), _beg(reader.
getBeg()), _end(reader.
getEnd())
65 void setWindow(pos_type beg, size_type size);
67 pos_type setBeg(pos_type);
70 return _reader.setCur(mid(this->
getBeg(), cur, this->
getEnd()));
72 pos_type setEnd(pos_type);
83 size_type readChars(char_type buf[], size_type len);
109 size_type readChars(char_type buf[], size_type len);
162 : _writer(writer), _last(
'\0'), _numSyncs(0)
166 int_type writeChar(char_type ch);
174 size_type writeChars(
const char_type[], size_type len);
197 : _writer(writer), _data(), _origSize(0)
size_type readChars(char buf[], size_type len)
pos_type setCur(pos_type cur)
Set the value of the current position for reading.
int_type peekChar()
Return the next character to be read without advancing the internal position.
CharReader(ID3_Reader &reader)
pos_type getBeg()
Return the beginning position in the reader.
size_type readChars(char_type buf[], size_type len)
Read len characters into the array buf.
pos_type getEnd()
Return the ending position in the reader.
void close()
Close the reader.
pos_type getCur()
Return the current position in the reader.
CompressedReader(ID3_Reader &reader, size_type newSize)
CompressedWriter(ID3_Writer &writer)
virtual ~CompressedWriter()
pos_type getCur()
Return the next position that will be written to.
void close()
Close the writer.
size_type getOrigSize() const
void flush()
Flush the writer.
size_type writeChars(const char_type buf[], size_type len)
Write up to len characters into buf and advance the internal position accordingly.
size_type writeChars(const char buf[], size_type len)
LineFeedReader(ID3_Reader &reader)
UnsyncedReader(ID3_Reader &reader)
pos_type getBeg()
Return the beginning position in the writer.
size_type getNumSyncs() const
size_type writeChars(const char_type[], size_type len)
Write len characters into the array buf.
size_type writeChars(const char buf[], size_type len)
void close()
Close the writer.
pos_type getEnd()
Return the first position that can't be written to.
pos_type getCur()
Return the next position that will be written to.
UnsyncedWriter(ID3_Writer &writer)
pos_type getCur()
Return the current position in the reader.
WindowedReader(ID3_Reader &reader)
size_type readChars(char buf[], size_type len)
void setWindow(pos_type beg, size_type size)
pos_type getBeg()
Return the beginning position in the reader.
pos_type setCur(pos_type cur)
Set the value of the current position for reading.
pos_type getEnd()
Return the ending position in the reader.
WindowedReader(ID3_Reader &reader, size_type size)
void close()
Close the reader.
size_type readChars(char_type buf[], size_type len)
Read up to len characters into buf and advance the internal position accordingly.
WindowedReader(ID3_Reader &reader, pos_type beg, size_type size)