载入中...
搜索中...
未找到
eve::xml::Element类 参考
#include <Xml.h>
Public 成员函数 | |
| Element ()=default | |
| operator bool () const | |
| bool | operator== (const Element &other) const |
| bool | operator!= (const Element &other) const |
| std::string | tagName () const |
| Element | parent () const |
| bool | hasAttribute (const char *name) const |
| std::string | getAttribute (const char *name, const std::string &fallback={}) const |
| int | getIntAttribute (const char *name, int fallback=0) const |
| std::vector< Element > | children (const char *tag=nullptr) const |
| std::vector< Element > | elementsByTag (const char *tag) const |
友元 | |
| class | Document |
详细描述
构造及析构函数说明
◆ Element()
|
default |
被这些函数引用 children(), elementsByTag() , 以及 parent().
成员函数说明
◆ children()
| std::vector< Element > eve::xml::Element::children | ( | const char * | tag = nullptr | ) | const |
Direct child elements. When tag is non-null, only children whose tag equals tag are returned.
引用了 eve::xml::Node::children, Element() , 以及 tag.
◆ elementsByTag()
| std::vector< Element > eve::xml::Element::elementsByTag | ( | const char * | tag | ) | const |
◆ getAttribute()
| std::string eve::xml::Element::getAttribute | ( | const char * | name, |
| const std::string & | fallback = {} |
||
| ) | const |
◆ getIntAttribute()
| int eve::xml::Element::getIntAttribute | ( | const char * | name, |
| int | fallback = 0 |
||
| ) | const |
引用了 getAttribute(), hasAttribute() , 以及 name.
◆ hasAttribute()
| bool eve::xml::Element::hasAttribute | ( | const char * | name | ) | const |
◆ operator bool()
|
inlineexplicit |
◆ operator!=()
◆ operator==()
◆ parent()
| Element eve::xml::Element::parent | ( | ) | const |
Parent element, or a null Element for the document root / invalid.
引用了 Element() , 以及 eve::xml::Node::parent.
◆ tagName()
| std::string eve::xml::Element::tagName | ( | ) | const |
Local tag name (no namespace prefix stripping). Empty when invalid.
引用了 eve::xml::Node::tag.
友元及相关函数文档
◆ Document
该类的文档由以下文件生成: