LLDB mainline
lldb_private::XMLNode Class Reference

#include <XML.h>

Public Member Functions

 XMLNode ()
 XMLNode (XMLNodeImpl node)
 ~XMLNode ()
 operator bool () const
void Clear ()
bool IsValid () const
bool IsElement () const
llvm::StringRef GetName () const
bool GetElementText (std::string &text) const
bool GetElementTextAsUnsigned (uint64_t &value, uint64_t fail_value=0, int base=0) const
bool GetElementTextAsFloat (double &value, double fail_value=0.0) const
bool NameIs (const char *name) const
XMLNode GetParent () const
XMLNode GetSibling () const
XMLNode GetChild () const
std::string GetAttributeValue (const char *name, const char *fail_value=nullptr) const
bool GetAttributeValueAsUnsigned (const char *name, uint64_t &value, uint64_t fail_value=0, int base=0) const
XMLNode FindFirstChildElementWithName (const char *name) const
XMLNode GetElementForPath (const NamePath &path)
void ForEachSiblingNode (NodeCallback const &callback) const
void ForEachSiblingElement (NodeCallback const &callback) const
void ForEachSiblingElementWithName (const char *name, NodeCallback const &callback) const
void ForEachChildNode (NodeCallback const &callback) const
void ForEachChildElement (NodeCallback const &callback) const
void ForEachChildElementWithName (const char *name, NodeCallback const &callback) const
void ForEachAttribute (AttributeCallback const &callback) const

Protected Attributes

XMLNodeImpl m_node = nullptr

Detailed Description

Definition at line 46 of file XML.h.

Constructor & Destructor Documentation

◆ XMLNode() [1/2]

◆ XMLNode() [2/2]

XMLNode::XMLNode ( XMLNodeImpl node)

Definition at line 95 of file XML.cpp.

References m_node.

◆ ~XMLNode()

XMLNode::~XMLNode ( )
default

Member Function Documentation

◆ Clear()

void XMLNode::Clear ( )

Definition at line 99 of file XML.cpp.

References m_node.

◆ FindFirstChildElementWithName()

XMLNode XMLNode::FindFirstChildElementWithName ( const char * name) const

◆ ForEachAttribute()

◆ ForEachChildElement()

◆ ForEachChildElementWithName()

◆ ForEachChildNode()

void XMLNode::ForEachChildNode ( NodeCallback const & callback) const

Definition at line 162 of file XML.cpp.

References ForEachSiblingNode(), GetChild(), and IsValid().

◆ ForEachSiblingElement()

void XMLNode::ForEachSiblingElement ( NodeCallback const & callback) const

Definition at line 222 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

Referenced by ForEachChildElement().

◆ ForEachSiblingElementWithName()

void XMLNode::ForEachSiblingElementWithName ( const char * name,
NodeCallback const & callback ) const

Definition at line 239 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

Referenced by ForEachChildElementWithName().

◆ ForEachSiblingNode()

void XMLNode::ForEachSiblingNode ( NodeCallback const & callback) const

Definition at line 209 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

Referenced by ForEachChildNode().

◆ GetAttributeValue()

◆ GetAttributeValueAsUnsigned()

bool XMLNode::GetAttributeValueAsUnsigned ( const char * name,
uint64_t & value,
uint64_t fail_value = 0,
int base = 0 ) const

◆ GetChild()

XMLNode XMLNode::GetChild ( ) const

Definition at line 123 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

Referenced by ForEachChildElement(), ForEachChildElementWithName(), and ForEachChildNode().

◆ GetElementForPath()

XMLNode XMLNode::GetElementForPath ( const NamePath & path)

Definition at line 353 of file XML.cpp.

References FindFirstChildElementWithName(), IsValid(), and XMLNode().

◆ GetElementText()

◆ GetElementTextAsFloat()

bool XMLNode::GetElementTextAsFloat ( double & value,
double fail_value = 0.0 ) const

Definition at line 307 of file XML.cpp.

References GetElementText().

◆ GetElementTextAsUnsigned()

bool XMLNode::GetElementTextAsUnsigned ( uint64_t & value,
uint64_t fail_value = 0,
int base = 0 ) const

◆ GetName()

◆ GetParent()

XMLNode XMLNode::GetParent ( ) const

Definition at line 101 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

◆ GetSibling()

XMLNode XMLNode::GetSibling ( ) const

Definition at line 112 of file XML.cpp.

References IsValid(), m_node, and XMLNode().

Referenced by lldb_private::ApplePropertyList::GetValueNode().

◆ IsElement()

◆ IsValid()

◆ NameIs()

bool XMLNode::NameIs ( const char * name) const

Definition at line 314 of file XML.cpp.

References IsValid(), and m_node.

◆ operator bool()

lldb_private::XMLNode::operator bool ( ) const
inlineexplicit

Definition at line 54 of file XML.h.

References IsValid().

Member Data Documentation

◆ m_node


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