#include <Element.h>
Inheritance diagram for Element:


Public Methods | |
| Element (const string &name="Element", const StringMap &atts=StringMap(), const ChildList &children=ChildList()) | |
| constructor. More... | |
Inspectors | |
| virtual string | Get (const string &att) const |
| virtual StartTag* | GetStartTag () const |
| virtual EndTag* | GetEndTag () const |
| virtual ChildList | GetChildren () const |
| virtual StringVector | GetAttributes () const |
| virtual StringVector | GetValues () const |
| virtual StringMap | GetAttributeMap () const |
| virtual string | GetName () const |
Modifiers | |
| virtual Element | Set (const string &att, const string &val) |
| virtual Element | SetAttributeMap (const StringMap &newAttributeMap) |
| virtual Element | SetChildren (const ChildList &newChildren) |
| virtual Element | SetValues (const StringVector &newVals, const StringVector &newAtts=StringVector()) |
| virtual string& | operator[] (const string &newAtt) |
| virtual Element | SetName (const string &newName) |
Containable | |
methods inherited from the Containable interface | |
| virtual void | Add (XMLChild *const &) |
| virtual void | Delete (XMLChild *const &) |
| virtual size_t | Size () const |
| virtual bool | IsEmpty () const |
Writeable | |
method inherited from the Writeable interface | |
| virtual string | ToString () const |
Protected Methods | |
| virtual void | Init (const string &newNname, const StringMap &newAtts, const ChildList &newChildren) |
| Initialize a new name, attribute map, and children. | |
Object | |
methods inherited from the Object base class | |
| Element& | Copy (const Element &rhs) |
| Copy Constructor. | |
| virtual bool | Equals (const Element &rhs) const |
| operator==. | |
| virtual void | NullifyPointers () |
| makes all member pointers initially point to NULL. | |
| virtual void | Clear () |
| delete's all member pointers. | |
Protected Attributes | |
| StartTag* | start |
| for base classes like EmptyElement. | |
| EndTag* | end |
An abstraction for an XML element <element foo="bar">foobar</element>
|
|
constructor.
|
|
|
add a new child node to this element
|
|
|
delete a oldChild from the list of this element's nodes |
|
|
Get a value from the atts Map<string, string>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this does the same as element[att] = val
|
|
|
replace the current attributeMap with the given
|
|
|
replace the child nodes with the given list of nodes
|
|
|
assign a new name to this element
|
|
|
basically the same as SetAttributeMap, just with more params
|
|
|
|
|
|
Reimplemented in EmptyElement. |
|
|
same as Set() -- sets an attributes with a given value: element[newAtt] = val;
|
1.2.6 written by Dimitri van Heesch,
© 1997-2001