28 #ifndef _ID3LIB_WRITER_H_ 29 #define _ID3LIB_WRITER_H_ 44 virtual void close() = 0;
47 virtual void flush() = 0;
50 virtual pos_type
getBeg() {
return static_cast<pos_type
>(0); }
55 virtual pos_type
getEnd() {
return static_cast<pos_type
>(-1); }
58 virtual pos_type getCur() = 0;
61 virtual size_type
getSize() {
return this->getCur() - this->getBeg(); }
64 virtual size_type
getMaxSize() {
return this->getEnd() - this->getBeg(); }
77 this->writeChars(&ch, 1);
86 virtual size_type writeChars(
const char_type buf[], size_type len) = 0;
87 virtual size_type
writeChars(
const char buf[], size_type len)
89 return this->writeChars(reinterpret_cast<const char_type *>(buf), len);
94 return this->getCur() >= this->getEnd();
virtual size_type writeChars(const char buf[], size_type len)
virtual pos_type getBeg()
Return the beginning position in the writer.
static const int_type END_OF_WRITER
virtual size_type getMaxSize()
Return the maximum number of bytes that can be written.
virtual pos_type getEnd()
Return the first position that can't be written to.
virtual size_type getSize()
Return the number of bytes written.
virtual int_type writeChar(char_type ch)
Write a single character and advance the internal position.