libgta
1.2.1
Read and Write Generic Tagged Array (GTA) files
|
Tag Lists. More...
Public Member Functions | |
uintmax_t | tags () const |
Get the number of tags. More... | |
const char * | name (uintmax_t i) const |
Get a tag name. More... | |
const char * | value (uintmax_t i) const |
Get a tag value. More... | |
const char * | get (const char *name) const |
Get a tag value by its name. More... | |
void | set (const char *name, const char *value) |
Set a tag. More... | |
void | unset (const char *name) |
Unset a tag. More... | |
void | unset_all () |
Unset all tags. More... | |
const taglist & | operator= (const taglist &tl) |
Assignment operator. More... | |
Friends | |
class | header |
Tag Lists.
GTA stores meta information in tags. Tag names are non-empty UTF-8 strings that must not contain '='.
Tag values are UTF-8 strings.
If you do not want to deal with conversions between the local character set and UTF-8, you must restrict names and values to ASCII.
|
inline |
Get the number of tags.
|
inline |
Get a tag name.
i | The tag index. |
|
inline |
Get a tag value.
i | The tag index. |
|
inline |
Get a tag value by its name.
name | The tag name. |
|
inline |
Set a tag.
name | The tag name. |
value | The tag value. |
Sets the given tag, possibly overwriting an existing tag with the same name. The name and value must be valid UTF-8 strings without control characters. Additionally, the name must not contain the equal sign and must not be empty.
|
inline |
Unset a tag.
name | The tag name. |
Removes the tag with the given name, if it exists.
|
inline |
Unset all tags.
Removes all tags.
Assignment operator.
tl | The tag list to copy. |