TagLib::ID3v1::StringHandler Class Reference

An abstraction for the string to data encoding in ID3v1 tags. More...

`#include <id3v1tag.h>`

## Public Member Functions

| StringHandler ()
virtual | ~StringHandler ()
| StringHandler (const StringHandler &)=delete
StringHandler & | operator= (const StringHandler &)=delete
virtual String | parse (const ByteVector &data) const
virtual ByteVector | render (const String &s) const

## Detailed Description

An abstraction for the string to data encoding in ID3v1 tags.

ID3v1 should in theory always contain ISO-8859-1 (Latin1) data. In practice it does not. TagLib by default only supports ISO-8859-1 data in ID3v1 tags.

However by subclassing this class and reimplementing parse() and render() and setting your reimplementation as the default with ID3v1::Tag::setStringHandler() you can define how you would like these transformations to be done.

Warning
  It is advisable not to write non-ISO-8859-1 data to ID3v1 tags. Please consider disabling the writing of ID3v1 tags in the case that the data is not ISO-8859-1.

See also
  ID3v1::Tag::setStringHandler()

## Constructor & Destructor Documentation

## StringHandler() [1/2]

TagLib::ID3v1::StringHandler::StringHandler | ( |  | ) |

Referenced by operator=(), and StringHandler().

## ~StringHandler()

virtual TagLib::ID3v1::StringHandler::~StringHandler | ( |  | ) |

virtual

## StringHandler() [2/2]

TagLib::ID3v1::StringHandler::StringHandler | ( | const StringHandler & |  | ) |

delete

References StringHandler().

## Member Function Documentation

## operator=()

StringHandler & TagLib::ID3v1::StringHandler::operator= | ( | const StringHandler & |  | ) |

delete

References StringHandler().

## parse()

virtual String TagLib::ID3v1::StringHandler::parse | ( | const ByteVector & | data | ) | const

virtual

Decode a string from data. The default implementation assumes that data is an ISO-8859-1 (Latin1) character array.

## render()

virtual ByteVector TagLib::ID3v1::StringHandler::render | ( | const String & | s | ) | const

virtual

Encode a ByteVector with the data from s. The default implementation assumes that s is an ISO-8859-1 (Latin1) string. If the string is does not conform to ISO-8859-1, no value is written.

Warning
  It is recommended that you not override this method, but instead do not write an ID3v1 tag in the case that the data is not ISO-8859-1.

References TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE.

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

- id3v1tag.h