casa::XMLtoken Class Reference

Representation of a single XML token. More...

#include <XMLtoken.h>

List of all members.

Public Member Functions

 XMLtoken (String n)
 Constructor that takes the tag name.
 ~XMLtoken ()
std::map< String, String > * getAttributes ()
 Returns the attributes for this tag.
std::vector< XMLtoken * > * getTags ()
 Returns the list of content tags, or an empty list if there are none.
const String getName ()
 Returns this tag's name.
void setContent (String c)
 Sets the String content of this tag to the given value.
const String getContent ()
 Returns the String content of this tag, or blank if there is none.
String getAttribute (String attr)
 Returns the value for the given attribute, or blank if the attribute is invalid.

Private Attributes

const String name
 Tag name.
String content
 String content (or blank for none).
std::vector< XMLtoken * > tags
 Token content (empty list for none).
std::map< String, String > attributes
 Tag attributes.

Detailed Description

Representation of a single XML token.

Synopsis

XMLtoken encapsulates an XML token which includes a name, zero or more attributes, and optional content which can be a String or one or more XMLtokens.

Definition at line 47 of file XMLtoken.h.


Constructor & Destructor Documentation

casa::XMLtoken::XMLtoken ( String  n  ) 

Constructor that takes the tag name.

casa::XMLtoken::~XMLtoken (  ) 

Member Function Documentation

String casa::XMLtoken::getAttribute ( String  attr  ) 

Returns the value for the given attribute, or blank if the attribute is invalid.

std::map<String, String>* casa::XMLtoken::getAttributes (  ) 

Returns the attributes for this tag.

const String casa::XMLtoken::getContent (  ) 

Returns the String content of this tag, or blank if there is none.

const String casa::XMLtoken::getName (  ) 

Returns this tag's name.

std::vector<XMLtoken*>* casa::XMLtoken::getTags (  ) 

Returns the list of content tags, or an empty list if there are none.

void casa::XMLtoken::setContent ( String  c  ) 

Sets the String content of this tag to the given value.


Member Data Documentation

std::map<String, String> casa::XMLtoken::attributes [private]

Tag attributes.

Definition at line 86 of file XMLtoken.h.

String casa::XMLtoken::content [private]

String content (or blank for none).

Definition at line 80 of file XMLtoken.h.

const String casa::XMLtoken::name [private]

Tag name.

Definition at line 77 of file XMLtoken.h.

std::vector<XMLtoken*> casa::XMLtoken::tags [private]

Token content (empty list for none).

Definition at line 83 of file XMLtoken.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1