PCL
pcl::XMLAttribute Class Reference

XML element attribute More...

#include <XML.h>

+ Inheritance diagram for pcl::XMLAttribute:

Public Member Functions

 XMLAttribute ()=default
 
 XMLAttribute (const String &name, const String &value=String())
 
 XMLAttribute (const XMLAttribute &)=default
 
String EncodedValue () const
 
const StringName () const
 
bool operator< (const XMLAttribute &x) const
 
bool operator== (const XMLAttribute &x) const
 
void SetValue (const String &text)
 
const StringValue () const
 
- Public Member Functions inherited from pcl::XMLComponent
 XMLComponent ()=default
 
 XMLComponent (const XMLComponent &)=default
 
virtual ~XMLComponent ()
 
bool IsTopLevel () const
 
XMLElementParentElement () const
 

Detailed Description

The XMLAttribute class represents an element attribute, as defined by the Attribute construct:

https://www.w3.org/TR/xml11/#NT-Attribute

Definition at line 747 of file XML.h.

Constructor & Destructor Documentation

◆ XMLAttribute() [1/3]

pcl::XMLAttribute::XMLAttribute ( )
default

Constructs an empty XML attribute. An empty attribute is ignored for inclusion in element attribute lists.

◆ XMLAttribute() [2/3]

pcl::XMLAttribute::XMLAttribute ( const String name,
const String value = String() 
)
inline

Constructs a new XMLAttribute object with the specified qualified name and value.

The specified name should be a valid XML qualified name, as defined by the W3C recommendation:

https://www.w3.org/TR/xml-names/#ns-qualnames

However, the name is not checked for validity by this constructor, for performance reasons. Attribute and element names are verified during the document parsing and generation tasks.

Definition at line 770 of file XML.h.

◆ XMLAttribute() [3/3]

pcl::XMLAttribute::XMLAttribute ( const XMLAttribute )
default

Copy constructor.

Member Function Documentation

◆ EncodedValue()

String pcl::XMLAttribute::EncodedValue ( ) const
inline

Returns an encoded version of the attribute value. All characters that cannot legally occur in an XML attribute value are replaced by their corresponding entity references.

Definition at line 810 of file XML.h.

References pcl::XML::EncodedText().

◆ Name()

const String& pcl::XMLAttribute::Name ( ) const
inline

Returns a reference to the (immutable) qualified name of this attribute.

Definition at line 784 of file XML.h.

Referenced by pcl::XMLAttributeList::SetAttribute().

◆ operator<()

bool pcl::XMLAttribute::operator< ( const XMLAttribute x) const
inline

Less-than relational operator.

To compare XML element attributes, only their qualified names are taken into account. Note that this restricts valid attribute comparisons to a particular XML document.

Definition at line 834 of file XML.h.

◆ operator==()

bool pcl::XMLAttribute::operator== ( const XMLAttribute x) const
inline

Equality operator.

Two XML element attributes are considered equal if their qualified names are identical. Note that this restricts valid attribute comparisons to a particular XML document.

Definition at line 822 of file XML.h.

◆ SetValue()

void pcl::XMLAttribute::SetValue ( const String text)
inline

Sets a new value for this XML element attribute.

Definition at line 800 of file XML.h.

◆ Value()

const String& pcl::XMLAttribute::Value ( ) const
inline

Returns a reference to the (immutable) value of this element attribute.

Definition at line 792 of file XML.h.


The documentation for this class was generated from the following file: