GCC Middle and Back End API Reference
xml::document Struct Reference

#include <xml.h>

Inheritance diagram for xml::document:
Collaboration diagram for xml::document:

Public Member Functions

void write_as_xml (pretty_printer *pp, int depth, bool indent) const final override
void add_child (std::unique_ptr< node > node)
void add_text (std::string str)
void add_text_from_pp (pretty_printer &pp)
void add_comment (std::string str)
elementfind_child_element (std::string kind) const
virtual textdyn_cast_text ()
virtual elementdyn_cast_element ()
void dump (FILE *out) const
void DEBUG_FUNCTION dump () const

Data Fields

std::unique_ptr< doctypedeclm_doctypedecl
std::vector< std::unique_ptr< node > > m_children

Member Function Documentation

◆ add_child()

void xml::node_with_children::add_child ( std::unique_ptr< node > node)
inherited

◆ add_comment()

void xml::node_with_children::add_comment ( std::string str)
inherited

References add_child().

◆ add_text()

void xml::node_with_children::add_text ( std::string str)
inherited

References add_child(), and m_children.

Referenced by xml::printer::add_text(), and add_text_from_pp().

◆ add_text_from_pp()

void xml::node_with_children::add_text_from_pp ( pretty_printer & pp)
inherited

◆ dump() [1/2]

void DEBUG_FUNCTION xml::node::dump ( ) const
inlineinherited

References DEBUG_FUNCTION, and dump().

Referenced by dump().

◆ dump() [2/2]

void xml::node::dump ( FILE * out) const
inherited

◆ dyn_cast_element()

virtual element * xml::node::dyn_cast_element ( )
inlinevirtualinherited

Reimplemented in xml::element.

◆ dyn_cast_text()

virtual text * xml::node::dyn_cast_text ( )
inlinevirtualinherited

Reimplemented in xml::text.

◆ find_child_element()

element * xml::node_with_children::find_child_element ( std::string kind) const
inherited

◆ write_as_xml()

void xml::document::write_as_xml ( pretty_printer * pp,
int depth,
bool indent ) const
finaloverridevirtual
struct document : public node_with_children.

Implements xml::node.

References xml::node_with_children::m_children, m_doctypedecl, and pp_string().

Field Documentation

◆ m_children

◆ m_doctypedecl

std::unique_ptr<doctypedecl> xml::document::m_doctypedecl

Referenced by write_as_xml().


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