Ardour  9.0-pre0-693-g8bf9aefe10
XMLNode Class Reference

#include <xml++.h>

Public Member Functions

 XMLNode (const std::string &name)
 
 XMLNode (const std::string &name, const std::string &content)
 
 XMLNode (const XMLNode &other)
 
 ~XMLNode ()
 
XMLNodeoperator= (const XMLNode &other)
 
bool operator== (const XMLNode &other) const
 
bool operator!= (const XMLNode &other) const
 
const std::string & name () const
 
bool is_content () const
 
const std::string & content () const
 
const std::string & set_content (const std::string &)
 
XMLNodeadd_content (const std::string &s=std::string())
 
const std::string & child_content () const
 
const XMLNodeListchildren (const std::string &str=std::string()) const
 
XMLNodechild (const char *) const
 
XMLNodeadd_child (const char *)
 
XMLNodeadd_child_copy (const XMLNode &)
 
void add_child_nocopy (XMLNode &)
 
std::string attribute_value ()
 
const XMLPropertyListproperties () const
 
XMLProperty const * property (const char *) const
 
XMLProperty const * property (const std::string &) const
 
XMLPropertyproperty (const char *)
 
XMLPropertyproperty (const std::string &)
 
bool has_property_with_value (const std::string &, const std::string &) const
 
bool set_property (const char *name, const std::string &value)
 
bool set_property (const char *name, const char *cstr)
 
bool set_property (const char *name, const Glib::ustring &ustr)
 
template<class T >
bool set_property (const char *name, const T &value)
 
bool get_property (const char *name, std::string &value) const
 
template<class T >
bool get_property (const char *name, T &value) const
 
void remove_property (const std::string &)
 
void remove_property_recursively (const std::string &)
 
void remove_nodes (const std::string &)
 
void remove_nodes_and_delete (const std::string &)
 
void remove_nodes_and_delete (const std::string &propname, const std::string &val)
 
void remove_node_and_delete (const std::string &n, const std::string &propname, const std::string &val)
 
void dump (std::ostream &, std::string p="") const
 

Private Member Functions

void clear_lists ()
 

Private Attributes

std::string _name
 
bool _is_content
 
std::string _content
 
XMLNodeList _children
 
XMLPropertyList _proplist
 
XMLNodeList _selected_children
 

Detailed Description

Definition at line 114 of file xml++.h.

Constructor & Destructor Documentation

◆ XMLNode() [1/3]

XMLNode::XMLNode ( const std::string &  name)

◆ XMLNode() [2/3]

XMLNode::XMLNode ( const std::string &  name,
const std::string &  content 
)

◆ XMLNode() [3/3]

XMLNode::XMLNode ( const XMLNode other)

◆ ~XMLNode()

XMLNode::~XMLNode ( )

Member Function Documentation

◆ add_child()

XMLNode* XMLNode::add_child ( const char *  )

◆ add_child_copy()

XMLNode* XMLNode::add_child_copy ( const XMLNode )

◆ add_child_nocopy()

void XMLNode::add_child_nocopy ( XMLNode )

◆ add_content()

XMLNode* XMLNode::add_content ( const std::string &  s = std::string())

◆ attribute_value()

std::string XMLNode::attribute_value ( )

◆ child()

XMLNode* XMLNode::child ( const char *  ) const

◆ child_content()

const std::string& XMLNode::child_content ( ) const

◆ children()

const XMLNodeList& XMLNode::children ( const std::string &  str = std::string()) const

◆ clear_lists()

void XMLNode::clear_lists ( )
private

◆ content()

const std::string& XMLNode::content ( ) const
inline

Definition at line 129 of file xml++.h.

◆ dump()

void XMLNode::dump ( std::ostream &  ,
std::string  p = "" 
) const

◆ get_property() [1/2]

bool XMLNode::get_property ( const char *  name,
std::string &  value 
) const

◆ get_property() [2/2]

template<class T >
bool XMLNode::get_property ( const char *  name,
T &  value 
) const
inline

Definition at line 175 of file xml++.h.

◆ has_property_with_value()

bool XMLNode::has_property_with_value ( const std::string &  ,
const std::string &   
) const

◆ is_content()

bool XMLNode::is_content ( ) const
inline

Definition at line 128 of file xml++.h.

◆ name()

const std::string& XMLNode::name ( ) const
inline

Definition at line 126 of file xml++.h.

◆ operator!=()

bool XMLNode::operator!= ( const XMLNode other) const

◆ operator=()

XMLNode& XMLNode::operator= ( const XMLNode other)

◆ operator==()

bool XMLNode::operator== ( const XMLNode other) const

◆ properties()

const XMLPropertyList& XMLNode::properties ( ) const
inline

Definition at line 143 of file xml++.h.

◆ property() [1/4]

XMLProperty* XMLNode::property ( const char *  )

◆ property() [2/4]

XMLProperty const* XMLNode::property ( const char *  ) const

◆ property() [3/4]

XMLProperty* XMLNode::property ( const std::string &  )

◆ property() [4/4]

XMLProperty const* XMLNode::property ( const std::string &  ) const

◆ remove_node_and_delete()

void XMLNode::remove_node_and_delete ( const std::string &  n,
const std::string &  propname,
const std::string &  val 
)

Remove and delete first node with given name and prop matching val

◆ remove_nodes()

void XMLNode::remove_nodes ( const std::string &  )

Remove all nodes with the name passed to remove_nodes

◆ remove_nodes_and_delete() [1/2]

void XMLNode::remove_nodes_and_delete ( const std::string &  )

Remove and delete all nodes with the name passed to remove_nodes

◆ remove_nodes_and_delete() [2/2]

void XMLNode::remove_nodes_and_delete ( const std::string &  propname,
const std::string &  val 
)

Remove and delete all nodes with property prop matching val

◆ remove_property()

void XMLNode::remove_property ( const std::string &  )

◆ remove_property_recursively()

void XMLNode::remove_property_recursively ( const std::string &  )

◆ set_content()

const std::string& XMLNode::set_content ( const std::string &  )

◆ set_property() [1/4]

bool XMLNode::set_property ( const char *  name,
const char *  cstr 
)
inline

Definition at line 153 of file xml++.h.

◆ set_property() [2/4]

bool XMLNode::set_property ( const char *  name,
const Glib::ustring &  ustr 
)
inline

Definition at line 157 of file xml++.h.

◆ set_property() [3/4]

bool XMLNode::set_property ( const char *  name,
const std::string &  value 
)

◆ set_property() [4/4]

template<class T >
bool XMLNode::set_property ( const char *  name,
const T &  value 
)
inline

Definition at line 163 of file xml++.h.

Member Data Documentation

◆ _children

XMLNodeList XMLNode::_children
private

Definition at line 203 of file xml++.h.

◆ _content

std::string XMLNode::_content
private

Definition at line 202 of file xml++.h.

◆ _is_content

bool XMLNode::_is_content
private

Definition at line 201 of file xml++.h.

◆ _name

std::string XMLNode::_name
private

Definition at line 200 of file xml++.h.

◆ _proplist

XMLPropertyList XMLNode::_proplist
private

Definition at line 204 of file xml++.h.

◆ _selected_children

XMLNodeList XMLNode::_selected_children
mutableprivate

Definition at line 205 of file xml++.h.


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