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
 

Detailed Description

Definition at line 44 of file XML.h.

Constructor & Destructor Documentation

◆ XMLNode() [1/2]

XMLNode::XMLNode ( )

◆ XMLNode() [2/2]

XMLNode::XMLNode ( XMLNodeImpl  node)

Definition at line 95 of file XML.cpp.

◆ ~XMLNode()

XMLNode::~XMLNode ( )

Definition at line 97 of file XML.cpp.

Member Function Documentation

◆ Clear()

void XMLNode::Clear ( )

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

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

Referenced by operator bool().

◆ ForEachSiblingElement()

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

Definition at line 225 of file XML.cpp.

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

Referenced by ForEachChildElement(), and operator bool().

◆ ForEachSiblingElementWithName()

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

Definition at line 242 of file XML.cpp.

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

Referenced by ForEachChildElementWithName(), and operator bool().

◆ ForEachSiblingNode()

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

Definition at line 212 of file XML.cpp.

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

Referenced by ForEachChildNode(), and operator bool().

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

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

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

◆ GetElementForPath()

XMLNode XMLNode::GetElementForPath ( const NamePath path)

Definition at line 372 of file XML.cpp.

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

Referenced by operator bool().

◆ GetElementText()

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

◆ GetElementTextAsFloat()

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

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

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

Referenced by operator bool().

◆ 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(), and operator bool().

◆ IsElement()

bool XMLNode::IsElement ( ) const

◆ IsValid()

bool XMLNode::IsValid ( ) const

◆ NameIs()

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

Definition at line 333 of file XML.cpp.

References IsValid(), and m_node.

Referenced by lldb_private::ApplePropertyList::ExtractStringFromValueNode(), and operator bool().

◆ operator bool()

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

Member Data Documentation

◆ m_node

XMLNodeImpl lldb_private::XMLNode::m_node
protected

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