TagLib API Documentation
Public Member Functions | List of all members
TagLib::RIFF::Info::StringHandler Class Reference

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

#include <infotag.h>

Public Member Functions

 StringHandler ()
 
virtual ~StringHandler ()
 
 StringHandler (const StringHandler &)=delete
 
StringHandleroperator= (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 Info tags.

RIFF INFO tag has no clear definitions about character encodings. In practice, local encoding of each system is largely used and UTF-8 is popular too.

Here is an option to read and write tags in your preferred encoding by subclassing this class, reimplementing parse() and render() and setting your reimplementation as the default with Info::Tag::setStringHandler().

See also
ID3v1::Tag::setStringHandler()

Constructor & Destructor Documentation

◆ StringHandler() [1/2]

TagLib::RIFF::Info::StringHandler::StringHandler ( )

◆ ~StringHandler()

virtual TagLib::RIFF::Info::StringHandler::~StringHandler ( )
virtual

◆ StringHandler() [2/2]

TagLib::RIFF::Info::StringHandler::StringHandler ( const StringHandler )
delete

Member Function Documentation

◆ operator=()

StringHandler & TagLib::RIFF::Info::StringHandler::operator= ( const StringHandler )
delete

◆ parse()

virtual String TagLib::RIFF::Info::StringHandler::parse ( const ByteVector data) const
virtual

Decode a string from data. The default implementation assumes that data is an UTF-8 character array.

◆ render()

virtual ByteVector TagLib::RIFF::Info::StringHandler::render ( const String s) const
virtual

Encode a ByteVector with the data from s. The default implementation assumes that s is an UTF-8 string.


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