zenilib
0.5.3.0
|
#include <XML.h>
Inherited by Zeni::XML_Element.
Public Member Functions | |
XML_Element_c (const TiXmlHandle &handle) | |
XML_Element_c | first () const |
Get the first subelement. More... | |
bool | good () const |
Test to see if the Element is valid. More... | |
XML_Element_c | next () const |
Get the next subelement. More... | |
XML_Element_c | operator[] (const String &field) const |
Get a named subelement. More... | |
bool | to_bool () const |
Get the contained string as a boolean. More... | |
double | to_double () const |
Get the contained string as a double precision floating point number. More... | |
float | to_float () const |
Get the contained string as a floating point number. More... | |
int | to_int () const |
Get the contained string as an integer. More... | |
String | to_string () const |
Get the contained string. More... | |
String | value () const |
Get the value of the element (For nodes, this is the name) More... | |
Protected Member Functions | |
TiXmlNode * | child (const String &field) const |
TiXmlNode * | child_element (const String &field) const |
TiXmlNode * | first_child () const |
TiXmlNode * | first_child_element () const |
Protected Attributes | |
TiXmlHandle | m_handle |
Zeni::XML_Element_c::XML_Element_c | ( | const TiXmlHandle & | handle | ) |
Definition at line 29 of file XML.cpp.
Referenced by first(), next(), and operator[]().
Definition at line 120 of file XML.cpp.
References Zeni::String::c_str(), TiXmlNode::FirstChild(), m_handle, and TiXmlHandle::ToNode().
Definition at line 130 of file XML.cpp.
References Zeni::String::c_str(), TiXmlNode::FirstChildElement(), m_handle, and TiXmlHandle::ToNode().
Referenced by operator[](), and Zeni::XML_Element::operator[]().
XML_Element_c Zeni::XML_Element_c::first | ( | ) | const |
Get the first subelement.
Definition at line 44 of file XML.cpp.
References first_child_element(), m_handle, TiXmlNode::ToElement(), TiXmlHandle::ToNode(), and XML_Element_c().
Referenced by Zeni::Database< TYPE >::load_file().
|
protected |
Definition at line 125 of file XML.cpp.
References TiXmlNode::FirstChild(), m_handle, and TiXmlHandle::ToNode().
Referenced by Zeni::XML_Element::set_string().
|
protected |
Definition at line 135 of file XML.cpp.
References TiXmlNode::FirstChildElement(), m_handle, and TiXmlHandle::ToNode().
Referenced by first(), and Zeni::XML_Element::first().
bool Zeni::XML_Element_c::good | ( | ) | const |
Test to see if the Element is valid.
Basic Element Functionality
Definition at line 64 of file XML.cpp.
References m_handle, and TiXmlHandle::ToElement().
Referenced by Zeni::Database< TYPE >::load_file(), Zeni::XML_Element::remove_child(), Zeni::XML_Element::set_string(), to_string(), and value().
XML_Element_c Zeni::XML_Element_c::next | ( | ) | const |
Get the next subelement.
Definition at line 54 of file XML.cpp.
References m_handle, TiXmlNode::NextSiblingElement(), TiXmlHandle::ToNode(), and XML_Element_c().
XML_Element_c Zeni::XML_Element_c::operator[] | ( | const String & | field | ) | const |
Get a named subelement.
Tree Traversal
Definition at line 34 of file XML.cpp.
References child_element(), m_handle, TiXmlNode::ToElement(), TiXmlHandle::ToNode(), and XML_Element_c().
bool Zeni::XML_Element_c::to_bool | ( | ) | const |
Get the contained string as a boolean.
Text Accessors
Definition at line 83 of file XML.cpp.
References to_int().
Referenced by load_config().
double Zeni::XML_Element_c::to_double | ( | ) | const |
Get the contained string as a double precision floating point number.
Definition at line 95 of file XML.cpp.
References to_string().
float Zeni::XML_Element_c::to_float | ( | ) | const |
Get the contained string as a floating point number.
Definition at line 91 of file XML.cpp.
References to_string().
int Zeni::XML_Element_c::to_int | ( | ) | const |
Get the contained string as an integer.
Definition at line 87 of file XML.cpp.
References to_string().
Referenced by load_config(), and to_bool().
String Zeni::XML_Element_c::to_string | ( | ) | const |
Get the contained string.
Definition at line 99 of file XML.cpp.
References TiXmlElement::GetText(), good(), m_handle, and TiXmlHandle::ToElement().
Referenced by load_config(), Zeni::Video::preinit_from_file(), to_double(), to_float(), and to_int().
String Zeni::XML_Element_c::value | ( | ) | const |
Get the value of the element (For nodes, this is the name)
Definition at line 68 of file XML.cpp.
References good(), m_handle, TiXmlHandle::ToElement(), and TiXmlNode::Value().
|
protected |
Definition at line 83 of file XML.h.
Referenced by child(), child_element(), Zeni::XML_Element::create_child(), first(), Zeni::XML_Element::first(), first_child(), first_child_element(), good(), next(), Zeni::XML_Element::next(), operator[](), Zeni::XML_Element::operator[](), Zeni::XML_Element::remove_child(), Zeni::XML_Element::set_string(), to_string(), and value().