id3lib 3.8.3

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Attributes | List of all members
ID3_Writer Class Referenceabstract

`#include <writer.h>`

Inheritance diagram for ID3_Writer:

## Public Types
typedef uint32 | size_type
typedef uint8 | char_type
typedef uint32 | pos_type
typedef int32 | off_type
typedef int16 | int_type

## Public Member Functions
virtual void | close ()=0
| Close the writer. More...
virtual void | flush ()=0
| Flush the writer. More...
virtual pos_type | getBeg ()
| Return the beginning position in the writer. More...
virtual pos_type | getEnd ()
| Return the first position that can't be written to. More...
virtual pos_type | getCur ()=0
| Return the next position that will be written to. More...
virtual size_type | getSize ()
| Return the number of bytes written. More...
virtual size_type | getMaxSize ()
| Return the maximum number of bytes that can be written. More...
virtual int_type | writeChar (char_type ch)
| Write a single character and advance the internal position. More...
virtual size_type | writeChars (const char_type buf[], size_type len)=0
| Write up to `len` characters into buf and advance the internal position accordingly. More...
virtual size_type | writeChars (const char buf[], size_type len)
virtual bool | atEnd ()

## Static Public Attributes
static const int_type | END_OF_WRITER = -1

## Detailed Description

Definition at line 33 of file writer.h.

## Member Typedef Documentation

typedef uint8 ID3_Writer::char_type

Definition at line 37 of file writer.h.

typedef int16 ID3_Writer::int_type

Definition at line 40 of file writer.h.

typedef int32 ID3_Writer::off_type

Definition at line 39 of file writer.h.

typedef uint32 ID3_Writer::pos_type

Definition at line 38 of file writer.h.

typedef uint32 ID3_Writer::size_type

Definition at line 36 of file writer.h.

## Member Function Documentation

virtual bool ID3_Writer::atEnd | ( |  | ) |
| inline virtual

Definition at line 92 of file writer.h.

virtual void ID3_Writer::close | ( |  | ) |
| pure virtual

Close the writer.

Any further actions on the writer should fail.

Implemented in ID3_MemoryWriter, ID3_FStreamWriter, ID3_IOStreamWriter, ID3_OFStreamWriter, and ID3_OStreamWriter.

virtual void ID3_Writer::flush | ( |  | ) |
| pure virtual

Flush the writer.

Implemented in ID3_MemoryWriter, ID3_IOStreamWriter, and ID3_OStreamWriter.

virtual pos_type ID3_Writer::getBeg | ( |  | ) |
| inline virtual

Return the beginning position in the writer.

Reimplemented in ID3_MemoryWriter, ID3_IOStreamWriter, and ID3_OStreamWriter.

Definition at line 50 of file writer.h.

virtual pos_type ID3_Writer::getCur | ( |  | ) |
| pure virtual

Return the next position that will be written to.

Implemented in ID3_MemoryWriter, ID3_IOStreamWriter, and ID3_OStreamWriter.

virtual pos_type ID3_Writer::getEnd | ( |  | ) |
| inline virtual

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

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

Reimplemented in ID3_MemoryWriter.

Definition at line 55 of file writer.h.

virtual size_type ID3_Writer::getMaxSize | ( |  | ) |
| inline virtual

Return the maximum number of bytes that can be written.

Definition at line 64 of file writer.h.

virtual size_type ID3_Writer::getSize | ( |  | ) |
| inline virtual

Return the number of bytes written.

Definition at line 61 of file writer.h.

virtual int_type ID3_Writer::writeChar | ( | char_type | ch | ) |
| inline 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 in ID3_IOStreamWriter, and ID3_OStreamWriter.

Definition at line 71 of file writer.h.

virtual size_type ID3_Writer::writeChars | ( | const char_type | buf[],
|  | size_type | len
| ) |  |
| pure virtual

Write up to `len` characters into buf and advance the internal position accordingly.

Returns the number of characters write into buf. Note that the value returned may be less than the number of bytes that the internal position advances, due to multi-byte characters.

Implemented in ID3_MemoryWriter, ID3_IOStreamWriter, and ID3_OStreamWriter.

virtual size_type ID3_Writer::writeChars | ( | const char | buf[],
|  | size_type | len
| ) |  |
| inline virtual

Reimplemented in ID3_MemoryWriter, ID3_IOStreamWriter, and ID3_OStreamWriter.

Definition at line 87 of file writer.h.

## Member Data Documentation

const ID3_Writer::int_type ID3_Writer::END_OF_WRITER = -1
| static

Definition at line 41 of file writer.h.

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

- include/id3/writer.h
- src/io.cpp