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

CTBxmlToken Class Reference

XML token **. More...

#include "CTBxmlIStream.hxx"

Collaboration diagram for CTBxmlToken:

Collaboration graph
[legend]
List of all members.

Public Types

enum  type {
  invalid = -1, fail, eof, data,
  starttag, endtag, emptytag, comment,
  xml, pi
}

Public Methods

 CTBxmlToken (int i_type=CTBxmlToken::invalid)
 CTBxmlToken (const CTBxmlToken &rhs)
 CTBxmlToken (CTBxmlToken &rhs, bool b_grab)
 ~CTBxmlToken ()
int Type () const
const CTBstringText () const
const CTBstringName () const
const CTBstringValue () const
CTBint NAttribute () const
const CTBstringAttributeName (CTBint i_ind) const
const CTBstringAttributeValue (CTBint i_ind) const
void Clear ()
void Grab (CTBxmlToken &rhs)
void ToStream (ostream &os) const
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const
bool operator! () const
 operator void * () const
CTBxmlToken & operator= (const CTBxmlToken &rhs)

Private Types

typedef CTBpair< CTBstring,
CTBstring
pair_ss_t

Private Attributes

int mi_type
CTBstring m_text
CTBstring m_name
CTBstring m_value
CTBvector< pair_ss_tm_attribute

Friends

class CTBxmlIStream

Related Functions

(Note that these are not member functions.)

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

Detailed Description

XML token **.

Definition at line 25 of file CTBxmlIStream.hxx.


Member Typedef Documentation

typedef CTBpair<CTBstring,CTBstring> CTBxmlToken::pair_ss_t [private]
 

Definition at line 71 of file CTBxmlIStream.hxx.

Referenced by CTBxmlIStream::GetTagFromLexer().


Member Enumeration Documentation

enum CTBxmlToken::type
 

Token type.

Enumeration values:
invalid   uninitialized.
fail   stream in fail or bad.
eof   stream in eof.
data   CDATA or PCDATA.
starttag   start tag (<xxx...>).
endtag   end tag (</xxx>).
emptytag   empty tag (<xxx .../>).
comment   comment (<!-- ... -->).
xml   xml declaration (<?xml...?>).
pi   processing instruction (<?xxx..

Definition at line 30 of file CTBxmlIStream.hxx.


Constructor & Destructor Documentation

CTBxmlToken::CTBxmlToken int i_type = CTBxmlToken::invalid [explicit]
 

Construct with type (also default).

Definition at line 39 of file CTBxmlIStream.cxx.

CTBxmlToken::CTBxmlToken const CTBxmlToken & rhs
 

Copy constructor.

Definition at line 52 of file CTBxmlIStream.cxx.

CTBxmlToken::CTBxmlToken CTBxmlToken & rhs,
bool b_grab
 

Grab constructor.

Definition at line 65 of file CTBxmlIStream.cxx.

CTBxmlToken::~CTBxmlToken
 

Destructor.

Definition at line 79 of file CTBxmlIStream.cxx.


Member Function Documentation

int CTBxmlToken::Type const [inline]
 

Returns token type.

Definition at line 17 of file CTBxmlIStream.icc.

Referenced by CTBattrList::FromXStream(), and CTBxmlIStream::NextNotEnd().

const CTBstring & CTBxmlToken::Text const [inline]
 

Returns raw text representing the token in input stream.

Definition at line 25 of file CTBxmlIStream.icc.

const CTBstring & CTBxmlToken::Name const [inline]
 

Returns tag name.

Definition at line 33 of file CTBxmlIStream.icc.

Referenced by CTBattrList::FromXStream().

const CTBstring & CTBxmlToken::Value const [inline]
 

Returns tag or data value.

Definition at line 41 of file CTBxmlIStream.icc.

CTBint CTBxmlToken::NAttribute const [inline]
 

Returns number of tag attributes.

Definition at line 49 of file CTBxmlIStream.icc.

const CTBstring & CTBxmlToken::AttributeName CTBint i_ind const [inline]
 

Returns name of first tag attribute.

Definition at line 57 of file CTBxmlIStream.icc.

const CTBstring & CTBxmlToken::AttributeValue CTBint i_ind const [inline]
 

Returns value of first tag attribute.

Definition at line 65 of file CTBxmlIStream.icc.

void CTBxmlToken::Clear
 

Reset token, is in invalid state afterwards.

Definition at line 87 of file CTBxmlIStream.cxx.

Referenced by CTBxmlIStream::Close(), and CTBxmlIStream::Get().

void CTBxmlToken::Grab CTBxmlToken & rhs
 

Grab resources.

Definition at line 102 of file CTBxmlIStream.cxx.

Referenced by CTBxmlIStream::Get(), and CTBxmlIStream::Unget().

void CTBxmlToken::ToStream ostream & os const
 

ostream insertion.

Definition at line 118 of file CTBxmlIStream.cxx.

Referenced by operator<<().

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

Dump.

Definition at line 174 of file CTBxmlIStream.cxx.

Referenced by CTBxmlIStream::Dump().

bool CTBxmlToken::operator! const [inline]
 

Negation operator, returns true if token is invalid.

Definition at line 73 of file CTBxmlIStream.icc.

CTBxmlToken::operator void * const [inline]
 

Returns non-zero pointer if token is valid.

Definition at line 81 of file CTBxmlIStream.icc.

CTBxmlToken & CTBxmlToken::operator= const CTBxmlToken & rhs
 

Assignment.

Definition at line 194 of file CTBxmlIStream.cxx.


Friends And Related Function Documentation

friend class CTBxmlIStream [friend]
 

Definition at line 27 of file CTBxmlIStream.hxx.

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

ostream insertion operator.

Definition at line 92 of file CTBxmlIStream.icc.


Member Data Documentation

int CTBxmlToken::mi_type [private]
 

token type.

Definition at line 73 of file CTBxmlIStream.hxx.

CTBstring CTBxmlToken::m_text [private]
 

raw text.

Definition at line 74 of file CTBxmlIStream.hxx.

CTBstring CTBxmlToken::m_name [private]
 

tag name.

Definition at line 75 of file CTBxmlIStream.hxx.

CTBstring CTBxmlToken::m_value [private]
 

tag or data value.

Definition at line 76 of file CTBxmlIStream.hxx.

CTBvector<pair_ss_t> CTBxmlToken::m_attribute [private]
 

attribute key-value pairs.

Definition at line 77 of file CTBxmlIStream.hxx.


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