id3lib 3.8.3
dami::io::UnsyncedWriter Class Reference

#include <io_decorators.h>

Inheritance diagram for dami::io::UnsyncedWriter:
ID3_Writer

Public Member Functions

 UnsyncedWriter (ID3_Writer &writer)
size_type getNumSyncs () const
int_type writeChar (char_type ch)
 Write a single character and advance the internal position.
void flush ()
 Flush the writer.
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 getBeg ()
 Return the beginning position in the writer.
pos_type getCur ()
 Return the next position that will be written to.
pos_type getEnd ()
 Return the first position that can't be written to.
Public Member Functions inherited from ID3_Writer
virtual size_type getSize ()
 Return the number of bytes written.
virtual size_type getMaxSize ()
 Return the maximum number of bytes that can be written.
virtual bool atEnd ()

Additional Inherited Members

Public Types inherited from ID3_Writer
typedef uint32 size_type
typedef uint8 char_type
typedef uint32 pos_type
typedef int32 off_type
typedef int16 int_type
Static Public Attributes inherited from ID3_Writer
static const int_type END_OF_WRITER = -1

Detailed Description

Definition at line 152 of file io_decorators.h.

Constructor & Destructor Documentation

◆ UnsyncedWriter()

dami::io::UnsyncedWriter::UnsyncedWriter ( ID3_Writer & writer)
inline

Definition at line 161 of file io_decorators.h.

Member Function Documentation

◆ close()

void dami::io::UnsyncedWriter::close ( )
inlinevirtual

Close the writer.

Any further actions on the writer should fail.

Implements ID3_Writer.

Definition at line 180 of file io_decorators.h.

◆ flush()

void io::UnsyncedWriter::flush ( )
virtual

Flush the writer.

Implements ID3_Writer.

Definition at line 229 of file io_decorators.cpp.

◆ getBeg()

pos_type dami::io::UnsyncedWriter::getBeg ( )
inlinevirtual

Return the beginning position in the writer.

Reimplemented from ID3_Writer.

Definition at line 182 of file io_decorators.h.

◆ getCur()

pos_type dami::io::UnsyncedWriter::getCur ( )
inlinevirtual

Return the next position that will be written to.

Implements ID3_Writer.

Definition at line 183 of file io_decorators.h.

◆ getEnd()

pos_type dami::io::UnsyncedWriter::getEnd ( )
inlinevirtual

Return the first position that can't be written to.

A return value of -1 indicates no (reasonable) limit to the writer.

Reimplemented from ID3_Writer.

Definition at line 184 of file io_decorators.h.

◆ getNumSyncs()

size_type dami::io::UnsyncedWriter::getNumSyncs ( ) const
inline

Definition at line 165 of file io_decorators.h.

◆ writeChar()

ID3_Writer::int_type io::UnsyncedWriter::writeChar ( char_type ch)
virtual

Write a single character and advance the internal position.

Note that the interal position may advance more than one byte for a single character write. Returns END_OF_WRITER if there isn't a character to write.

Reimplemented from ID3_Writer.

Definition at line 218 of file io_decorators.cpp.

◆ writeChars() [1/2]

size_type dami::io::UnsyncedWriter::writeChars ( const char buf[],
size_type len )
inlinevirtual

Reimplemented from ID3_Writer.

Definition at line 175 of file io_decorators.h.

◆ writeChars() [2/2]

ID3_Writer::size_type io::UnsyncedWriter::writeChars ( const char_type buf[],
size_type len )
virtual

Write len characters into the array buf.

Since the stream needs might have been unsynced, this function copies the characters one at a time.

Implements ID3_Writer.

Definition at line 240 of file io_decorators.cpp.


The documentation for this class was generated from the following files: