Public Types | |
typedef AttribMap::iterator | AttribIter |
typedef std::vector< StringPair > | AttribMap |
typedef List::iterator | Iter |
typedef std::vector< Ptr > | List |
typedef Tag * | Ptr |
typedef std::pair< std::string, std::string > | StringPair |
Public Member Functions | |
void | appendAttribString (std::string &tmp) |
std::string::size_type | fromXML (const std::string &tmp, std::string::size_type start, int aa, bool isRoot=false) throw (SimpleXMLException) |
const std::string & | getAttrib (const std::string &aName, const std::string &aDefault=Util::emptyString) |
std::string::size_type | loadAttribs (const std::string &tmp, std::string::size_type start) throw (SimpleXMLException) |
Tag (const std::string &aName, const std::string &aData, Ptr aParent, int numAttribs=0) | |
ADCHPP_DLL std::string | toXML (int indent) |
~Tag () | |
Delete all children! | |
Public Attributes | |
AttribMap | attribs |
Attributes of this tag. | |
List | children |
A simple list of children. | |
std::string | data |
Tag data, may be empty. | |
std::string | name |
Tag name. | |
Ptr | parent |
Parent tag, for easy traversal. |
Definition at line 119 of file SimpleXML.h.
typedef AttribMap::iterator adchpp::SimpleXML::Tag::AttribIter |
Definition at line 126 of file SimpleXML.h.
typedef std::vector<StringPair> adchpp::SimpleXML::Tag::AttribMap |
Definition at line 125 of file SimpleXML.h.
typedef List::iterator adchpp::SimpleXML::Tag::Iter |
Definition at line 123 of file SimpleXML.h.
typedef std::vector<Ptr> adchpp::SimpleXML::Tag::List |
Definition at line 122 of file SimpleXML.h.
typedef Tag* adchpp::SimpleXML::Tag::Ptr |
Definition at line 121 of file SimpleXML.h.
typedef std::pair<std::string, std::string> adchpp::SimpleXML::Tag::StringPair |
Definition at line 124 of file SimpleXML.h.
adchpp::SimpleXML::Tag::Tag | ( | const std::string & | aName, | |
const std::string & | aData, | |||
Ptr | aParent, | |||
int | numAttribs = 0 | |||
) | [inline] |
Definition at line 149 of file SimpleXML.h.
References attribs.
adchpp::SimpleXML::Tag::~Tag | ( | ) | [inline] |
void adchpp::SimpleXML::Tag::appendAttribString | ( | std::string & | tmp | ) |
Definition at line 83 of file SimpleXML.cpp.
References attribs, adchpp::SimpleXML::escape(), and adchpp::SimpleXML::needsEscape().
Referenced by toXML().
std::string::size_type adchpp::SimpleXML::Tag::fromXML | ( | const std::string & | tmp, | |
std::string::size_type | start, | |||
int | aa, | |||
bool | isRoot = false | |||
) | throw (SimpleXMLException) |
const std::string& adchpp::SimpleXML::Tag::getAttrib | ( | const std::string & | aName, | |
const std::string & | aDefault = Util::emptyString | |||
) | [inline] |
Definition at line 154 of file SimpleXML.h.
References attribs.
std::string::size_type adchpp::SimpleXML::Tag::loadAttribs | ( | const std::string & | tmp, | |
std::string::size_type | start | |||
) | throw (SimpleXMLException) |
string adchpp::SimpleXML::Tag::toXML | ( | int | indent | ) |
Definition at line 99 of file SimpleXML.cpp.
References appendAttribString(), children, data, adchpp::SimpleXML::escape(), name, and adchpp::SimpleXML::needsEscape().
Attributes of this tag.
According to the XML standard the names must be unique (case-sensitive). (Assuming that we have few attributes here, we use a vector instead of a (hash)map to save a few bytes of memory and unnecessary calls to the memory allocator...)
Definition at line 138 of file SimpleXML.h.
Referenced by appendAttribString(), getAttrib(), and Tag().
A simple list of children.
To find a tag, one must search the entire list.
Definition at line 131 of file SimpleXML.h.
Referenced by adchpp::SimpleXML::checkChildSelected(), adchpp::SimpleXML::findChild(), adchpp::SimpleXML::resetCurrentChild(), adchpp::SimpleXML::stepIn(), adchpp::SimpleXML::toXML(), toXML(), and ~Tag().
std::string adchpp::SimpleXML::Tag::data |
Tag data, may be empty.
Definition at line 144 of file SimpleXML.h.
Referenced by adchpp::SimpleXML::getData(), and toXML().
std::string adchpp::SimpleXML::Tag::name |
Parent tag, for easy traversal.
Definition at line 147 of file SimpleXML.h.
Referenced by adchpp::SimpleXML::stepOut().