Home You are here: Home > Support > Reference v1.0

Change language: German

XmPrsStream Class Reference

Inheritance diagram for XmPrsStream:

XmPathPrs List of all members.

Detailed Description

Class with basic functionality for parsing text encapsulated by a XmStreamIn.

It can be used as base class for specialized text parsers like XML. The basic functionality are reading characters, tokens and white spaces. Also error handling during parsing is handled by this class.


Public Member Functions

int GetLast () const
 Return the last read character.
const XmStringGetPrsError () const
 Return the error reason in case of an error.
int GetLineCount () const
 Return the currently read lines.
XmStreamInGetStreamInput ()
 Return attached input stream.
int GetCurLinePos () const
 Return position within the current line.
int GetNextChar ()
 Read a new character.
void GetPathOptionalSpace ()
 Read optional white space.
void GetPathRequiredSpace ()
 Read required white space. Throw exception, if no white space found.
bool GetNameToken (XmString &name)
 Read a token. Throw exception, if no token found.
bool GetNumberToken (XmString &intStr)
 Read a number. Throw exception, if no number found.
void StopStreamParsing (const char *err)
 Stop parsing the stream and set an error.

Static Public Member Functions

static bool IsNumber (int c)
 Return true, if character c is a number.
static bool IsLetter (int c)
 Return true, if character c is a letter.

Protected Member Functions

void ParseStream (XmStreamIn &si)
 Initialise reading a stream.


Member Function Documentation

void ParseStream XmStreamIn si  )  [protected]
 

Initialise reading a stream.

The function is protected to force derivation, for a new parser. The derived class is predestinated to hold temporary results.


Copyright © 2006 Praetz Software Development - www.exomware.com