casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::XMLtoken Class Reference

Representation of a single XML token. More...

#include <XMLtoken.h>

Public Member Functions

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

Private Attributes

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

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 casacore::String or one or more XMLtokens.

Definition at line 47 of file XMLtoken.h.

Constructor & Destructor Documentation

casa::XMLtoken::XMLtoken ( casacore::String  n)

Constructor that takes the tag name.

casa::XMLtoken::~XMLtoken ( )

Member Function Documentation

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

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

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

Returns the attributes for this tag.

const casacore::String casa::XMLtoken::getContent ( )

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

const casacore::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 ( casacore::String  c)

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

Member Data Documentation

std::map<casacore::String, casacore::String> casa::XMLtoken::attributes
private

Tag attributes.

Definition at line 86 of file XMLtoken.h.

casacore::String casa::XMLtoken::content
private

casacore::String content (or blank for none).

Definition at line 80 of file XMLtoken.h.

const casacore::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: