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

#include <XML.h>

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

Public Member Functions

 XMLDocument ()
 
 ~XMLDocument ()
 
 operator bool () const
 
bool IsValid () const
 
void Clear ()
 
bool ParseFile (const char *path)
 
bool ParseMemory (const char *xml, size_t xml_length, const char *url="untitled.xml")
 
XMLNode GetRootElement (const char *required_name=nullptr)
 
llvm::StringRef GetErrors () const
 

Static Public Member Functions

static void ErrorCallback (void *ctx, const char *format,...)
 
static bool XMLEnabled ()
 

Protected Attributes

XMLDocumentImpl m_document
 
StreamString m_errors
 

Detailed Description

Definition at line 111 of file XML.h.

Constructor & Destructor Documentation

◆ XMLDocument()

XMLDocument::XMLDocument ( )

Definition at line 19 of file XML.cpp.

◆ ~XMLDocument()

XMLDocument::~XMLDocument ( )

Definition at line 21 of file XML.cpp.

References Clear().

Member Function Documentation

◆ Clear()

void XMLDocument::Clear ( )

Definition at line 23 of file XML.cpp.

References m_document.

Referenced by ParseFile(), ParseMemory(), and ~XMLDocument().

◆ ErrorCallback()

void XMLDocument::ErrorCallback ( void *  ctx,
const char *  format,
  ... 
)
static

Definition at line 35 of file XML.cpp.

References lldb_private::Stream::EOL(), m_errors, and lldb_private::Stream::PrintfVarArg().

Referenced by ParseFile(), and ParseMemory().

◆ GetErrors()

llvm::StringRef XMLDocument::GetErrors ( ) const

◆ GetRootElement()

XMLNode XMLDocument::GetRootElement ( const char *  required_name = nullptr)

◆ IsValid()

bool XMLDocument::IsValid ( ) const

Definition at line 33 of file XML.cpp.

References m_document.

Referenced by GetRootElement(), ParseFile(), and ParseMemory().

◆ operator bool()

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

Definition at line 117 of file XML.h.

References lldb_private::XMLNode::Clear(), and lldb_private::XMLNode::IsValid().

◆ ParseFile()

bool XMLDocument::ParseFile ( const char *  path)

Definition at line 44 of file XML.cpp.

References Clear(), ErrorCallback(), IsValid(), and m_document.

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

◆ ParseMemory()

bool XMLDocument::ParseMemory ( const char *  xml,
size_t  xml_length,
const char *  url = "untitled.xml" 
)

◆ XMLEnabled()

bool XMLDocument::XMLEnabled ( )
static

Member Data Documentation

◆ m_document

XMLDocumentImpl lldb_private::XMLDocument::m_document
protected

Definition at line 139 of file XML.h.

Referenced by Clear(), GetRootElement(), IsValid(), ParseFile(), and ParseMemory().

◆ m_errors

StreamString lldb_private::XMLDocument::m_errors
protected

Definition at line 140 of file XML.h.

Referenced by ErrorCallback(), and GetErrors().


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