Simpatico  v1.10
List of all members | Public Member Functions
Util::XmlBase Class Reference

Detailed Description

Base class for classes that parse XML markup tags.

Definition at line 22 of file XmlBase.h.

#include <XmlBase.h>

Inheritance diagram for Util::XmlBase:
Util::XmlAttribute Util::XmlEndTag Util::XmlStartTag Util::XmlXmlTag

Public Member Functions

 XmlBase ()
 Constructor. More...
 
 ~XmlBase ()
 Destructor. More...
 
void setString (const std::string &string, int cursor=0)
 Initialize string and cursor. More...
 
void setCursor (int cursor)
 Set cursor. More...
 
void skip ()
 Skip leading white space, if any. More...
 
void next ()
 Advance to the next character. More...
 
const std::string & string () const
 Return the associated string. More...
 
int cursor () const
 Return the index of the current character. More...
 
int c () const
 Return the current character. More...
 
bool isEnd () const
 Has the cursor reached the end of the string? More...
 

Constructor & Destructor Documentation

Util::XmlBase::XmlBase ( )

Constructor.

Definition at line 16 of file XmlBase.cpp.

Util::XmlBase::~XmlBase ( )

Destructor.

Definition at line 26 of file XmlBase.cpp.

Member Function Documentation

void Util::XmlBase::setString ( const std::string &  string,
int  cursor = 0 
)

Initialize string and cursor.

Definition at line 32 of file XmlBase.cpp.

References setCursor(), and string().

Referenced by Util::XmlAttribute::match(), Util::XmlEndTag::match(), Util::XmlXmlTag::match(), and Util::XmlStartTag::matchLabel().

void Util::XmlBase::setCursor ( int  cursor)

Set cursor.

String must already be set.

Definition at line 42 of file XmlBase.cpp.

References cursor(), and UTIL_THROW.

Referenced by Util::XmlAttribute::match(), and setString().

void Util::XmlBase::skip ( )
inline
void Util::XmlBase::next ( )
inline
const std::string & Util::XmlBase::string ( ) const
inline
int Util::XmlBase::cursor ( ) const
inline

Return the index of the current character.

Definition at line 124 of file XmlBase.h.

Referenced by Util::XmlAttribute::match(), Util::XmlEndTag::match(), Util::XmlXmlTag::match(), Util::XmlStartTag::matchLabel(), and setCursor().

int Util::XmlBase::c ( ) const
inline
bool Util::XmlBase::isEnd ( ) const
inline

Has the cursor reached the end of the string?

Definition at line 136 of file XmlBase.h.

Referenced by Util::XmlAttribute::match(), Util::XmlEndTag::match(), Util::XmlXmlTag::match(), Util::XmlStartTag::matchAttribute(), and Util::XmlStartTag::matchLabel().


The documentation for this class was generated from the following files: