Main Page   Class Hierarchy   Compound List   File List   Compound Members  

StartTag Class Reference

An XML start tag. More...

#include <StartTag.h>

Inheritance diagram for StartTag:

Inheritance graph
[legend]
Collaboration diagram for StartTag:

Collaboration graph
[legend]
List of all members.

Public Methods

 StartTag (const string &name="StartTag", const StringMap &attributes=StringMap())
 constructor.

Inspectors
virtual string Get (const string &att) const
 Get a value from the tag's attributes. More...

virtual StringVector GetAttributes () const
 Get all of the start tag's attributes. More...

virtual StringVector GetValues () const
 Get all of the start tag's values. More...

virtual StringMap GetAttributeMap () const
 Get all of the start tag's attributes && values. More...

Modifiers
virtual StartTag SetAttributeMap (const StringMap &newAttributeMap)
 Set a new Map<string, string> of attributes and values.

virtual StartTag SetValues (const StringVector &newVals, const StringVector &newAtts=StringVector())
 Set new values. More...

virtual StartTag Set (const string &att, const string &val)
 Set an attribute's value.

virtual string& operator[] (const string &newAtt)
 same as Map::operator[]. More...

Writeable
virtual string ToString () const
 convert to a string.


Protected Methods

StartTag& Copy (const StartTag &rhs)
 copy constructor.

void Init (const string &newName, const StringMap &newAttributes)
 initializer.

bool Equals (const StartTag &rhs) const
 operator==.

void NullifyPointers ()
 initially set all member pointers to NULL.

void Clear ()
 delete member pointers.


Detailed Description

An XML start tag.

An abstraction of an XML start tag <start foo="bar">


Member Function Documentation

string StartTag::Get ( const string & att ) const [virtual]
 

Get a value from the tag's attributes.

Parameters:
att:   the attribute whose value we want
Returns:
the value of attribute att

StringMap StartTag::GetAttributeMap ( ) const [virtual]
 

Get all of the start tag's attributes && values.

Returns:
a Map<string, string> of the attributes and values

StringVector StartTag::GetAttributes ( ) const [virtual]
 

Get all of the start tag's attributes.

Returns:
a vector<string> of the attributes

StringVector StartTag::GetValues ( ) const [virtual]
 

Get all of the start tag's values.

Returns:
a vector<string> of all values

StartTag StartTag::SetValues ( const StringVector & newVals,
const StringVector & newAtts = StringVector() ) [virtual]
 

Set new values.

does the same as SetAttributeMap, only it takes vector<string>'s instead of a Map<string, string>

See also:
SetAttributeMap

string & StartTag::operator[] ( const string & newAtt ) [virtual]
 

same as Map::operator[].

use as in startTag[foo] = bar


The documentation for this class was generated from the following file:
Generated at Wed May 2 00:21:07 2001 for libXMLement by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001