|
TagLib
2.1.1
|
An implementation of APE-items. More...
#include <apeitem.h>
Public Types | |
| enum | ItemTypes { Text = 0 , Binary = 1 , Locator = 2 } |
Public Member Functions | |
| Item () | |
| Item (const String &key, const StringList &values) | |
| Item (const String &key, const ByteVector &value, bool binary) | |
| Item (const Item &item) | |
| ~Item () | |
| Item & | operator= (const Item &item) |
| void | swap (Item &item) noexcept |
| String | key () const |
| ByteVector | binaryData () const |
| void | setBinaryData (const ByteVector &value) |
| void | setKey (const String &key) |
| void | setValue (const String &value) |
| void | setValues (const StringList &values) |
| void | appendValue (const String &value) |
| void | appendValues (const StringList &values) |
| int | size () const |
| String | toString () const |
| StringList | values () const |
| ByteVector | render () const |
| void | parse (const ByteVector &data) |
| void | setReadOnly (bool readOnly) |
| bool | isReadOnly () const |
| void | setType (ItemTypes val) |
| ItemTypes | type () const |
| bool | isEmpty () const |
An implementation of APE-items.
This class provides the features of items in the APEv2 standard.
| TagLib::APE::Item::Item | ( | ) |
Constructs an empty item.
Referenced by Item(), operator=(), and swap().
| TagLib::APE::Item::Item | ( | const String & | key, |
| const StringList & | values ) |
| TagLib::APE::Item::Item | ( | const String & | key, |
| const ByteVector & | value, | ||
| bool | binary ) |
Constructs an item with key and value. If binary is true a Binary item will be created, otherwise value will be interpreted as text
References key().
| TagLib::APE::Item::Item | ( | const Item & | item | ) |
Construct an item as a copy of item.
References Item().
| TagLib::APE::Item::~Item | ( | ) |
Destroys the item.
| void TagLib::APE::Item::appendValue | ( | const String & | value | ) |
Appends value to create (or extend) the current list of text values.
| void TagLib::APE::Item::appendValues | ( | const StringList & | values | ) |
| ByteVector TagLib::APE::Item::binaryData | ( | ) | const |
Returns the binary value. If the item type is not Binary, always returns an empty ByteVector.
| bool TagLib::APE::Item::isEmpty | ( | ) | const |
Returns false if the item has any real content.
References TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE.
| bool TagLib::APE::Item::isReadOnly | ( | ) | const |
Return true if the item is read-only.
| String TagLib::APE::Item::key | ( | ) | const |
Copies the contents of item into this item.
References Item().
| void TagLib::APE::Item::parse | ( | const ByteVector & | data | ) |
Parse the item from the ByteVector data.
| ByteVector TagLib::APE::Item::render | ( | ) | const |
Render the item to a ByteVector.
| void TagLib::APE::Item::setBinaryData | ( | const ByteVector & | value | ) |
Set the binary value to value The item's type will also be set to Binary
| void TagLib::APE::Item::setKey | ( | const String & | key | ) |
Sets the key for the item to key.
References key().
| void TagLib::APE::Item::setReadOnly | ( | bool | readOnly | ) |
Set the item to read-only.
| void TagLib::APE::Item::setType | ( | ItemTypes | val | ) |
Sets the type of the item to val.
| void TagLib::APE::Item::setValue | ( | const String & | value | ) |
Sets the text value of the item to value and clears any previous contents.
| void TagLib::APE::Item::setValues | ( | const StringList & | values | ) |
| int TagLib::APE::Item::size | ( | ) | const |
Returns the size of the full item.
|
noexcept |
Exchanges the content of this item with the content of item.
References Item().
| String TagLib::APE::Item::toString | ( | ) | const |
Returns the value as a single string. In case of multiple strings, the first is returned. If the data type is not Text, always returns an empty String.
| ItemTypes TagLib::APE::Item::type | ( | ) | const |
Returns the type of the item.
| StringList TagLib::APE::Item::values | ( | ) | const |
Returns the list of text values. If the data type is not Text, always returns an empty StringList.
Referenced by appendValues(), Item(), and setValues().