CXMLElement Class Reference

This class implements a facade for the xml Element. More...

#include <mia/core/xmlinterface.hh>

Public Types

typedef std::shared_ptr< CXMLElementPointer
 

Public Member Functions

CXMLElement::Pointer add_child (const char *name)
 add a new child element More...
 
 CXMLElement (const char *name)
 
 CXMLElement (const CXMLElement &orig)=delete
 
CXMLElementoperator= (const CXMLElement &orig)=delete
 
void set_attribute (const char *name, const std::string &value)
 Set an attribute of the node. More...
 
void set_child_text (const std::string &value)
 
 ~CXMLElement ()
 

Friends

class CXMLDocument
 

Detailed Description

This class implements a facade for the xml Element.

This class implements a facade for the XML IO to make it (later) possible to change the used XML implementation. It is also useful to reduce the compile time dependencies for programs that use MIA.

Definition at line 42 of file xmlinterface.hh.

Member Typedef Documentation

◆ Pointer

typedef std::shared_ptr<CXMLElement> CXMLElement::Pointer

Definition at line 44 of file xmlinterface.hh.

Constructor & Destructor Documentation

◆ CXMLElement() [1/2]

CXMLElement::CXMLElement ( const char *  name)

◆ ~CXMLElement()

CXMLElement::~CXMLElement ( )

◆ CXMLElement() [2/2]

CXMLElement::CXMLElement ( const CXMLElement orig)
delete

Member Function Documentation

◆ add_child()

CXMLElement::Pointer CXMLElement::add_child ( const char *  name)

add a new child element

This method adds a new child element to this node

Parameters
namename tag of the new child element
Returns
the newly created node

◆ operator=()

CXMLElement& CXMLElement::operator= ( const CXMLElement orig)
delete

◆ set_attribute()

void CXMLElement::set_attribute ( const char *  name,
const std::string &  value 
)

Set an attribute of the node.

This method sets an attribute of a node

Parameters
nameattribute name
value(string) value of the attribute

Referenced by TCmdOption< T >::TCmdOption(), and TRepeatableCmdOption< T >::TRepeatableCmdOption().

◆ set_child_text()

void CXMLElement::set_child_text ( const std::string &  value)

Set the child text of the node

Parameters
valuetext value to be set

Friends And Related Function Documentation

◆ CXMLDocument

friend class CXMLDocument
friend

Definition at line 78 of file xmlinterface.hh.


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