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

Implementation of IXmlAttribute using rapidxml. More...

#include <RapidXmlImpl.h>

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

Public Member Functions

 Attribute (::rapidxml::xml_attribute<> *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 rapidxml.

Member Function Documentation

◆ getName()

std::string musx::xml::rapidxml::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::rapidxml::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::rapidxml::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.