adchpp::SimpleXML::Tag Class Reference

Collaboration diagram for adchpp::SimpleXML::Tag:
Collaboration graph
[legend]

List of all members.

Public Types

typedef AttribMap::iterator AttribIter
typedef std::vector< StringPairAttribMap
typedef List::iterator Iter
typedef std::vector< PtrList
typedef TagPtr
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.

Detailed Description

Definition at line 119 of file SimpleXML.h.


Member Typedef Documentation

typedef AttribMap::iterator adchpp::SimpleXML::Tag::AttribIter

Definition at line 126 of file SimpleXML.h.

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.

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.


Constructor & Destructor Documentation

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]

Delete all children!

Definition at line 165 of file SimpleXML.h.

References children.


Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:


Member Data Documentation

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().

Tag data, may be empty.

Definition at line 144 of file SimpleXML.h.

Referenced by adchpp::SimpleXML::getData(), and toXML().

Tag name.

Definition at line 141 of file SimpleXML.h.

Referenced by toXML().

Parent tag, for easy traversal.

Definition at line 147 of file SimpleXML.h.

Referenced by adchpp::SimpleXML::stepOut().

Generated on Sat Nov 27 23:38:51 2010 for adchpp by  doxygen 1.6.3