|
MUSX Document Model
|
Interface for an XML attribute. More...
#include <XmlInterface.h>
Inheritance diagram for musx::xml::IXmlAttribute:Public Member Functions | |
| virtual std::string | getName () const =0 |
| Gets the name of the attribute. | |
| virtual std::string | getValue () const =0 |
| Gets the value of the attribute. | |
| std::string | getValueTrimmed () const |
| Gets the text content of the attribute with whitespace trimmed. | |
| template<typename T > | |
| T | getValueAs () const |
| Gets the value of the attribute, converted to the specified type. | |
| virtual std::shared_ptr< IXmlAttribute > | nextAttribute () const =0 |
| Advances to the next attribute. | |
Interface for an XML attribute.
|
pure virtual |
Gets the name of the attribute.
Implemented in musx::xml::pugi::Attribute, musx::xml::rapidxml::Attribute, and musx::xml::tinyxml2::Attribute.
|
pure virtual |
Gets the value of the attribute.
Implemented in musx::xml::pugi::Attribute, musx::xml::rapidxml::Attribute, and musx::xml::tinyxml2::Attribute.
|
inline |
Gets the value of the attribute, converted to the specified type.
| T | The type to which the value should be converted. |
| std::invalid_argument | if the conversion fails. |
|
pure virtual |
Advances to the next attribute.
Implemented in musx::xml::pugi::Attribute, musx::xml::rapidxml::Attribute, and musx::xml::tinyxml2::Attribute.