LLDB  mainline
Public Member Functions | Protected Attributes | List of all members
lldb_private::XMLNode Class Reference

#include <XML.h>

Collaboration diagram for lldb_private::XMLNode:
Collaboration graph
[legend]

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
 
llvm::StringRef 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::XMLNode ( )
default

◆ XMLNode() [2/2]

XMLNode::XMLNode ( XMLNodeImpl  node)

Definition at line 96 of file XML.cpp.

◆ ~XMLNode()

XMLNode::~XMLNode ( )
default

Member Function Documentation

◆ Clear()

void XMLNode::Clear ( )

Definition at line 100 of file XML.cpp.

References m_node.

◆ FindFirstChildElementWithName()

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

◆ ForEachAttribute()

void XMLNode::ForEachAttribute ( AttributeCallback const &  callback) const

◆ ForEachChildElement()

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

◆ ForEachChildElementWithName()

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

◆ ForEachChildNode()

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

Definition at line 166 of file XML.cpp.

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

◆ ForEachSiblingElement()

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

Definition at line 226 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 243 of file XML.cpp.

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

Referenced by ForEachChildElementWithName().

◆ ForEachSiblingNode()

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

Definition at line 213 of file XML.cpp.

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

Referenced by ForEachChildNode().

◆ GetAttributeValue()

llvm::StringRef XMLNode::GetAttributeValue ( const char *  name,
const char *  fail_value = nullptr 
) const

◆ 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 124 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 373 of file XML.cpp.

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

◆ GetElementText()

bool XMLNode::GetElementText ( std::string text) const

◆ GetElementTextAsFloat()

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

Definition at line 318 of file XML.cpp.

References GetElementText(), IsValid(), and string().

◆ GetElementTextAsUnsigned()

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

◆ GetName()

llvm::StringRef XMLNode::GetName ( ) const

◆ GetParent()

XMLNode XMLNode::GetParent ( ) const

Definition at line 102 of file XML.cpp.

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

◆ GetSibling()

XMLNode XMLNode::GetSibling ( ) const

Definition at line 113 of file XML.cpp.

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

◆ IsElement()

bool XMLNode::IsElement ( ) const

◆ IsValid()

bool XMLNode::IsValid ( ) const

◆ NameIs()

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

Definition at line 334 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

XMLNodeImpl lldb_private::XMLNode::m_node = nullptr
protected

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