Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

UTAP::PositionTracker Class Reference

Help class used by the lexer, parser and xmlreader to keep track of the current position. More...

#include <libparser.h>

List of all members.

Static Public Member Functions

static void reset ()
 Resets position tracker to position 0.
static void setPath (ParserBuilder *builder, std::string s)
 Sets the current path to s, offset to 0 and line to 1.
static int increment (ParserBuilder *builder, int n)
 Sets the position of builder to [position, position + n) and increments position and offset by n.
static void newline (ParserBuilder *builder, int n)
 Increments line by n and adds the position to builder.

Static Public Attributes

static uint32_t line
static uint32_t offset
static uint32_t position
static std::string path


Detailed Description

Help class used by the lexer, parser and xmlreader to keep track of the current position.


Member Function Documentation

int UTAP::PositionTracker::increment ParserBuilder builder,
int  n
[static]
 

Sets the position of builder to [position, position + n) and increments position and offset by n.

void UTAP::PositionTracker::newline ParserBuilder builder,
int  n
[static]
 

Increments line by n and adds the position to builder.

static void UTAP::PositionTracker::reset  )  [static]
 

Resets position tracker to position 0.

void UTAP::PositionTracker::setPath ParserBuilder builder,
std::string  s
[static]
 

Sets the current path to s, offset to 0 and line to 1.

Sets the position of builder to [position, position + 1) (a one character dummy position; this is useful when assigning error messages to XML elements without a text content). Adds position to builder and increments it by 1.


Member Data Documentation

uint32_t UTAP::PositionTracker::line [static]
 

uint32_t UTAP::PositionTracker::offset [static]
 

std::string UTAP::PositionTracker::path [static]
 

uint32_t UTAP::PositionTracker::position [static]
 


The documentation for this class was generated from the following files:
Generated on Sat Apr 29 21:02:14 2006 for libutap by  doxygen 1.4.2