![]() |
SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
|
#include <DMX.h>

Public Types | |
| using | iterator = std::vector<DMXAttribute>::iterator |
| using | const_iterator = std::vector<DMXAttribute>::const_iterator |
Public Member Functions | |
| operator bool () const | |
| std::string_view | getType () const |
| Get the C++ type the element maps to. | |
| void | setType (std::string type_) |
| Set the C++ type the element maps to. | |
| std::string_view | getKey () const |
| Get the key associated with the element. | |
| void | setKey (std::string key_) |
| Set the key associated with the element. | |
| const DMXValue::UUID & | getUUID () const |
| void | setUUID (const DMXValue::UUID &guid_) |
| bool | hasAttribute (std::string_view attributeKey) const |
| Check if the element has one or more children with the given name. | |
| DMXAttribute & | addAttribute (std::string key_, DMXValue::Generic value_={}) |
| Add an attribute to the element. | |
| uint64_t | getAttributeCount () const |
| Get the number of child attributes. | |
| uint64_t | getAttributeCount (std::string_view childKey) const |
| Get the number of child attributes with the given key. | |
| const std::vector< DMXAttribute > & | getAttributes () const |
| Get the child attributes of the element. | |
| std::vector< DMXAttribute > & | getAttributes () |
| Get the child attributes of the element. | |
| constexpr iterator | begin () |
| constexpr iterator | end () |
| constexpr const_iterator | begin () const |
| constexpr const_iterator | end () const |
| constexpr const_iterator | cbegin () const |
| constexpr const_iterator | cend () const |
| const DMXAttribute & | operator[] (unsigned int n) const |
| Get the attribute of the element at the given index. | |
| DMXAttribute & | operator[] (unsigned int n) |
| Get the attribute of the element at the given index. | |
| const DMXAttribute & | operator[] (std::string_view attributeKey) const |
| Get the first attribute of the element with the given key. | |
| DMXAttribute & | operator[] (std::string_view attributeKey) |
| Get the first attribute of the element with the given key, or create a new element if it doesn't exist. | |
| const DMXAttribute & | operator() (std::string_view attributeKey) const |
| Get the first attribute of the element with the given key. | |
| DMXAttribute & | operator() (std::string_view attributeKey) |
| Get the first attribute of the element with the given key, or create a new element if it doesn't exist. | |
| const DMXAttribute & | operator() (std::string_view attributeKey, unsigned int n) const |
| Get the nth attribute of the element with the given key. | |
| DMXAttribute & | operator() (std::string_view attributeKey, unsigned int n) |
| Get the nth attribute of the element with the given key, or create a new element if it doesn't exist. | |
| void | removeAttribute (unsigned int n) |
| Remove an attribute from the element. | |
| void | removeAttribute (std::string_view attributeKey, int n=-1) |
| Remove an attribute from the element with the given key. -1 means all children with the given key. | |
Static Public Member Functions | |
| static const DMXAttribute & | getInvalidAttribute () |
Protected Member Functions | |
| DMXElement ()=default | |
Protected Attributes | |
| std::string | type |
| std::string | key |
| DMXValue::UUID | uuid {} |
| std::vector< DMXAttribute > | attributes |
Friends | |
| class | DMX |
| using kvpp::DMXElement::const_iterator = std::vector<DMXAttribute>::const_iterator |
| using kvpp::DMXElement::iterator = std::vector<DMXAttribute>::iterator |
|
protecteddefault |
| DMXAttribute & DMXElement::addAttribute | ( | std::string | key_, |
| DMXValue::Generic | value_ = {} ) |
|
inlinenodiscardconstexpr |
|
inlinenodiscardconstexpr |
|
inlinenodiscardconstexpr |
|
inlinenodiscardconstexpr |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
static |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| void DMXElement::removeAttribute | ( | std::string_view | attributeKey, |
| int | n = -1 ) |
| void DMXElement::removeAttribute | ( | unsigned int | n | ) |
| void DMXElement::setKey | ( | std::string | key_ | ) |
| void DMXElement::setType | ( | std::string | type_ | ) |
| void DMXElement::setUUID | ( | const DMXValue::UUID & | guid_ | ) |
|
protected |
|
protected |