MUSX Document Model
Loading...
Searching...
No Matches
musx::xml::tinyxml2::Attribute Class Reference

Implementation of IXmlAttribute using tinyxml2. More...

#include <TinyXmlImpl.h>

+ Inheritance diagram for musx::xml::tinyxml2::Attribute:

Public Member Functions

 Attribute (const ::tinyxml2::XMLAttribute *attr)
 Constructor.
 
std::string getName () const override
 Gets the name of the attribute.
 
std::string getValue () const override
 Gets the value of the attribute.
 
std::shared_ptr< IXmlAttributenextAttribute () const override
 Advances to the next attribute.
 
- Public Member Functions inherited from musx::xml::IXmlAttribute
std::string getValueTrimmed () const
 Gets the text content of the attribute with whitespace trimmed.
 
template<typename T >
getValueAs () const
 Gets the value of the attribute, converted to the specified type.
 

Detailed Description

Implementation of IXmlAttribute using tinyxml2.

Member Function Documentation

◆ getName()

std::string musx::xml::tinyxml2::Attribute::getName ( ) const
inlineoverridevirtual

Gets the name of the attribute.

Returns
The name of the attribute.

Implements musx::xml::IXmlAttribute.

◆ getValue()

std::string musx::xml::tinyxml2::Attribute::getValue ( ) const
inlineoverridevirtual

Gets the value of the attribute.

Returns
The value of the attribute.

Implements musx::xml::IXmlAttribute.

◆ nextAttribute()

std::shared_ptr< IXmlAttribute > musx::xml::tinyxml2::Attribute::nextAttribute ( ) const
inlineoverridevirtual

Advances to the next attribute.

Returns
A shared pointer to the next attribute, or nullptr if there are no more attributes.

Implements musx::xml::IXmlAttribute.