Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cppdom::XMLLocation Class Reference

xml stream position represents the position in the xml input stream; usable if load() throws an error on parsing xml content. More...

#include <cppdom.h>

List of all members.

Public Methods

 XMLLocation ()
 Constructor. More...

int getLine () const
 returns current line. More...

int getPos () const
 returns current position in a line. More...

void step (int chars=1)
 advances a char. More...

void newline ()
 indicates entering a new line. More...

void reset ()
 reset location. More...


Protected Attributes

int mLine
int mPos


Detailed Description

xml stream position represents the position in the xml input stream; usable if load() throws an error on parsing xml content.

Definition at line 130 of file cppdom.h.


Constructor & Destructor Documentation

cppdom::XMLLocation::XMLLocation  
 

Constructor.

Definition at line 105 of file cppdom.cpp.

References reset().

00106    {
00107       reset();
00108    }


Member Function Documentation

int cppdom::XMLLocation::getLine   const
 

returns current line.

Definition at line 110 of file cppdom.cpp.

References mLine.

00111    {
00112       return mLine;
00113    }

int cppdom::XMLLocation::getPos   const
 

returns current position in a line.

Definition at line 115 of file cppdom.cpp.

References mPos.

00116    {
00117       return mPos;
00118    }

void cppdom::XMLLocation::newline  
 

indicates entering a new line.

Definition at line 125 of file cppdom.cpp.

References mLine, and mPos.

Referenced by cppdom::xmlstream_iterator::isNewLine().

00126    {
00127       ++mLine;
00128       mPos = 1;
00129    }

void cppdom::XMLLocation::reset  
 

reset location.

Definition at line 131 of file cppdom.cpp.

References mLine, and mPos.

Referenced by XMLLocation().

00132    {
00133       mLine = mPos = 0;
00134    }

void cppdom::XMLLocation::step int    chars = 1
 

advances a char.

Definition at line 120 of file cppdom.cpp.

References mPos.

Referenced by cppdom::xmlstream_iterator::getNext().

00121    {
00122       mPos += chars;
00123    }


Member Data Documentation

int cppdom::XMLLocation::mLine [protected]
 

Definition at line 152 of file cppdom.h.

Referenced by getLine(), newline(), and reset().

int cppdom::XMLLocation::mPos [protected]
 

Definition at line 153 of file cppdom.h.

Referenced by getPos(), newline(), reset(), and step().


The documentation for this class was generated from the following files:
Generated on Thu Jan 2 21:29:21 2003 for cppdom by doxygen1.2.15