MyGUI: MyGUI::xml::Element Class Reference

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Friends
MyGUI::xml::Element Class Reference

`#include <MyGUI_XmlDocument.h>`

## Public Member Functions
| ~Element ()
ElementPtr | createChild (const std::string &_name, const std::string &_content="", ElementType _type=ElementType::Normal)
void | removeChild (ElementPtr _child)
template<typename T >
void | addAttribute (const std::string &_key, const T &_value)
void | addAttribute (const std::string &_key, const std::string &_value)
void | removeAttribute (const std::string &_key)
void | setAttribute (const std::string &_key, const std::string &_value)
template<typename T >
void | addContent (const T &_content)
void | addContent (const std::string &_content)
template<typename T >
void | setContent (const T &_content)
void | setContent (const std::string &_content)
void | clear ()
bool | findAttribute (const std::string &_name, std::string &_value)
std::string | findAttribute (const std::string &_name)
const std::string & | getName () const
const std::string & | getContent () const
const VectorAttributes & | getAttributes () const
ElementPtr | getParent () const
ElementEnumerator | getElementEnumerator ()
ElementType | getType () const
ElementPtr | createCopy ()
template<typename T >
void | addAttributes (const std::string &_key, const T &_value)
void | addAttributes (const std::string &_key, const std::string &_value)
template<typename T >
void | addBody (const T &_content)
void | addBody (const std::string &_content)
template<typename T >
void | setBody (const T &_content)
void | setBody (const std::string &_content)
const std::string & | getBody () const
ElementEnumerator | getNodeIterator ()

## Friends
class | Document

## Detailed Description

Definition at line 158 of file MyGUI_XmlDocument.h.

## Constructor & Destructor Documentation

## ◆ ~Element()

MyGUI::xml::Element::~Element | ( |  | ) |

Definition at line 148 of file MyGUI_XmlDocument.cpp.

## Member Function Documentation

## ◆ addAttribute() [1/2]

void MyGUI::xml::Element::addAttribute | ( | const std::string & | _key,
|  | const std::string & | _value )

Definition at line 269 of file MyGUI_XmlDocument.cpp.

## ◆ addAttribute() [2/2]

template<typename T >

void MyGUI::xml::Element::addAttribute | ( | const std::string & | _key,
|  | const T & | _value )
| inline

Definition at line 174 of file MyGUI_XmlDocument.h.

## ◆ addAttributes() [1/2]

void MyGUI::xml::Element::addAttributes | ( | const std::string & | _key,
|  | const std::string & | _value )
| inline

Deprecated
  "use : void Element::addAttribute(const std::string& _key, const std::string& _value)"

Definition at line 230 of file MyGUI_XmlDocument.h.

## ◆ addAttributes() [2/2]

template<typename T >

void MyGUI::xml::Element::addAttributes | ( | const std::string & | _key,
|  | const T & | _value )
| inline

Deprecated
  "use : template <typename T> void Element::addAttribute(const std::string &_key, const T& _value)"

Definition at line 225 of file MyGUI_XmlDocument.h.

## ◆ addBody() [1/2]

void MyGUI::xml::Element::addBody | ( | const std::string & | _content | ) |
| inline

Deprecated
  "use : void Element::addContent(const std::string& _content)"

Definition at line 242 of file MyGUI_XmlDocument.h.

## ◆ addBody() [2/2]

template<typename T >

void MyGUI::xml::Element::addBody | ( | const T & | _content | ) |
| inline

Deprecated
  "use : template <typename T> void Element::addContent(const T& _content)"

Definition at line 237 of file MyGUI_XmlDocument.h.

## ◆ addContent() [1/2]

void MyGUI::xml::Element::addContent | ( | const std::string & | _content | ) |

Definition at line 314 of file MyGUI_XmlDocument.cpp.

## ◆ addContent() [2/2]

template<typename T >

void MyGUI::xml::Element::addContent | ( | const T & | _content | ) |
| inline

Definition at line 186 of file MyGUI_XmlDocument.h.

## ◆ clear()

void MyGUI::xml::Element::clear | ( |  | ) |

Definition at line 238 of file MyGUI_XmlDocument.cpp.

## ◆ createChild()

ElementPtr MyGUI::xml::Element::createChild | ( | const std::string & | _name,
|  | const std::string & | _content = "",
|  | ElementType | _type = ElementType::Normal )

Definition at line 221 of file MyGUI_XmlDocument.cpp.

## ◆ createCopy()

ElementPtr MyGUI::xml::Element::createCopy | ( |  | ) |

Definition at line 286 of file MyGUI_XmlDocument.cpp.

## ◆ findAttribute() [1/2]

std::string MyGUI::xml::Element::findAttribute | ( | const std::string & | _name | ) |

Definition at line 259 of file MyGUI_XmlDocument.cpp.

## ◆ findAttribute() [2/2]

bool MyGUI::xml::Element::findAttribute | ( | const std::string & | _name,
|  | std::string & | _value )

Definition at line 246 of file MyGUI_XmlDocument.cpp.

## ◆ getAttributes()

const VectorAttributes & MyGUI::xml::Element::getAttributes | ( |  | ) | const

Definition at line 342 of file MyGUI_XmlDocument.cpp.

## ◆ getBody()

const std::string & MyGUI::xml::Element::getBody | ( |  | ) | const
| inline

Deprecated
  "use : const std::string& Element::getContent()"

Definition at line 259 of file MyGUI_XmlDocument.h.

## ◆ getContent()

const std::string & MyGUI::xml::Element::getContent | ( |  | ) | const

Definition at line 337 of file MyGUI_XmlDocument.cpp.

## ◆ getElementEnumerator()

ElementEnumerator MyGUI::xml::Element::getElementEnumerator | ( |  | ) |

Definition at line 352 of file MyGUI_XmlDocument.cpp.

## ◆ getName()

const std::string & MyGUI::xml::Element::getName | ( |  | ) | const

Definition at line 332 of file MyGUI_XmlDocument.cpp.

## ◆ getNodeIterator()

ElementEnumerator MyGUI::xml::Element::getNodeIterator | ( |  | ) |
| inline

Deprecated
  "use : ElementEnumerator Element::getElementEnumerator()"

Definition at line 264 of file MyGUI_XmlDocument.h.

## ◆ getParent()

ElementPtr MyGUI::xml::Element::getParent | ( |  | ) | const

Definition at line 347 of file MyGUI_XmlDocument.cpp.

## ◆ getType()

ElementType MyGUI::xml::Element::getType | ( |  | ) | const

Definition at line 357 of file MyGUI_XmlDocument.cpp.

## ◆ removeAttribute()

void MyGUI::xml::Element::removeAttribute | ( | const std::string & | _key | ) |

Definition at line 274 of file MyGUI_XmlDocument.cpp.

## ◆ removeChild()

void MyGUI::xml::Element::removeChild | ( | ElementPtr | _child | ) |

Definition at line 228 of file MyGUI_XmlDocument.cpp.

## ◆ setAttribute()

void MyGUI::xml::Element::setAttribute | ( | const std::string & | _key,
|  | const std::string & | _value )

Definition at line 301 of file MyGUI_XmlDocument.cpp.

## ◆ setBody() [1/2]

void MyGUI::xml::Element::setBody | ( | const std::string & | _content | ) |
| inline

Deprecated
  "use : void Element::setContent(const std::string& _content)"

Definition at line 253 of file MyGUI_XmlDocument.h.

## ◆ setBody() [2/2]

template<typename T >

void MyGUI::xml::Element::setBody | ( | const T & | _content | ) |
| inline

Deprecated
  "use : template <typename T> void Element::setContent(const T& _content)"

Definition at line 248 of file MyGUI_XmlDocument.h.

## ◆ setContent() [1/2]

void MyGUI::xml::Element::setContent | ( | const std::string & | _content | ) |

Definition at line 327 of file MyGUI_XmlDocument.cpp.

## ◆ setContent() [2/2]

template<typename T >

void MyGUI::xml::Element::setContent | ( | const T & | _content | ) |
| inline

Definition at line 194 of file MyGUI_XmlDocument.h.

## Friends And Related Symbol Documentation

## ◆ Document

friend class Document
| friend

Definition at line 160 of file MyGUI_XmlDocument.h.

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

- MyGUI_XmlDocument.h
- MyGUI_XmlDocument.cpp