Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBxmlLexerToken Class Reference

XML lexical analyser token **. More...

#include "CTBxmlLexer.hxx"

Collaboration diagram for CTBxmlLexerToken:

Collaboration graph
[legend]
List of all members.

Public Types

enum  type {
  invalid = -1, fail, eof, tagopen,
  etagopen, tagclose, etagclose, comment,
  defopen, piopen, piclose, charref,
  entref, equal, squote, dquote,
  name, white, data
}

Public Methods

 CTBxmlLexerToken ()
int Type () const
void Type (int i_type)
const CTBstringText () const
void Clear ()
void ToStream (ostream &os) const
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const
bool operator! () const
 operator const char * () const
 operator CTBstring () const
CTBxmlLexerToken & operator= (const char *c_text)
CTBxmlLexerToken & operator+= (char c)
CTBxmlLexerToken & operator+= (const char *c_text)

Private Attributes

int mi_type
CTBstring m_text

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const CTBxmlLexerToken &obj)

Detailed Description

XML lexical analyser token **.

Definition at line 59 of file CTBxmlLexer.hxx.


Member Enumeration Documentation

enum CTBxmlLexerToken::type
 

Lexer token type.

Enumeration values:
invalid   uninitialized.
fail   stream in fail or bad.
eof   stream in eof.
tagopen   tag open "<".
etagopen   empty tag open "</".
tagclose   tag close ">".
etagclose   end tag close "/>".
comment   comment "<!-- .. -->".
defopen   definition "<!".
piopen   pi open "<?".
piclose   pi close "?>".
charref   character ref "&#..;".
entref   entity ref "&..;".
equal   equal char "=".
squote   single quote "'".
dquote   double quote '"'.
name   name to non-namechar.
white   white space.
data   character data to white,< or &.

Definition at line 61 of file CTBxmlLexer.hxx.


Constructor & Destructor Documentation

CTBxmlLexerToken::CTBxmlLexerToken [inline]
 

Default constructor.

Definition at line 112 of file CTBxmlLexer.icc.


Member Function Documentation

int CTBxmlLexerToken::Type const [inline]
 

Returns token type.

Definition at line 119 of file CTBxmlLexer.icc.

Referenced by CTBxmlLexer::Get(), CTBxmlLexer::GetEntity(), CTBxmlIStream::GetLexerToken(), CTBxmlLexer::GetName(), CTBxmlLexer::GetWhite(), and ToStream().

void CTBxmlLexerToken::Type int i_type [inline]
 

set token type.

Definition at line 127 of file CTBxmlLexer.icc.

const CTBstring & CTBxmlLexerToken::Text const [inline]
 

Returns token text.

Definition at line 136 of file CTBxmlLexer.icc.

Referenced by CTBxmlIStream::GetDataFromLexer(), CTBxmlIStream::GetLexerToken(), and CTBxmlIStream::GetTagFromLexer().

void CTBxmlLexerToken::Clear [inline]
 

Reset token, set state invalid and clear text.

Definition at line 144 of file CTBxmlLexer.icc.

Referenced by CTBxmlLexer::Get().

void CTBxmlLexerToken::ToStream ostream & os const
 

ostream insertion.

Definition at line 399 of file CTBxmlLexer.cxx.

Referenced by operator<<().

void CTBxmlLexerToken::Dump int i_indent = 0,
ostream & os = cout,
const char * p_text = 0
const
 

Dump.

Definition at line 434 of file CTBxmlLexer.cxx.

bool CTBxmlLexerToken::operator! const [inline]
 

Negation operator, returns true if token is invalid.

Definition at line 154 of file CTBxmlLexer.icc.

CTBxmlLexerToken::operator const char * const [inline]
 

char* conversion, returns text associated with token or 0 if token invalid.

Definition at line 162 of file CTBxmlLexer.icc.

CTBxmlLexerToken::operator CTBstring const [inline]
 

CTBstring conversion, returns text associated with token.

Definition at line 170 of file CTBxmlLexer.icc.

CTBxmlLexerToken & CTBxmlLexerToken::operator= const char * c_text [inline]
 

Set text value associated with token.

Definition at line 178 of file CTBxmlLexer.icc.

CTBxmlLexerToken & CTBxmlLexerToken::operator+= char c [inline]
 

Append character to text value associated with token.

Definition at line 187 of file CTBxmlLexer.icc.

CTBxmlLexerToken & CTBxmlLexerToken::operator+= const char * c_text [inline]
 

Append character string to text value associated with token.

Definition at line 196 of file CTBxmlLexer.icc.


Friends And Related Function Documentation

ostream & operator<< ostream & os,
const CTBxmlLexerToken & obj
[related]
 

ostream insertion operator.

Definition at line 208 of file CTBxmlLexer.icc.


Member Data Documentation

int CTBxmlLexerToken::mi_type [private]
 

token type.

Definition at line 107 of file CTBxmlLexer.hxx.

CTBstring CTBxmlLexerToken::m_text [private]
 

raw text associated with token.

Definition at line 108 of file CTBxmlLexer.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:14:15 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001