Public Member Functions | Private Attributes | List of all members
QXmlLocator Class Reference

The QXmlLocator class provides the XML handler classes with information about the actual parsing position. More...

#include <qxml.h>

Public Member Functions

 QXmlLocator (QXmlSimpleReader *parent)
 
 ~QXmlLocator ()
 
int columnNumber ()
 
int lineNumber ()
 

Private Attributes

QXmlSimpleReaderreader
 

Detailed Description

The QXmlLocator class provides the XML handler classes with information about the actual parsing position.

XML

The reader reports a QXmlLocator to the content handler before he starts to parse the document. This is done with the QXmlContentHandler::setDocumentLocator() function. The handler classes can now use this locator to get the actual position the reader is at.

Definition at line 379 of file qxml.h.

Constructor & Destructor Documentation

QXmlLocator::QXmlLocator ( QXmlSimpleReader parent)
inline

Constructor.

Definition at line 382 of file qxml.h.

383  { reader = parent; }
QXmlSimpleReader * reader
Definition: qxml.h:393
def parent(G, child, parent_type)
Definition: graph.py:67
QXmlLocator::~QXmlLocator ( )
inline

Destructor.

Definition at line 384 of file qxml.h.

385  { }

Member Function Documentation

int QXmlLocator::columnNumber ( )

Gets the column number (starting with 1) or -1 if there is no column number available.

Definition at line 284 of file qxml.cpp.

285 {
286  return ( reader->columnNr == -1 ? -1 : reader->columnNr + 1 );
287 }
int columnNr
Definition: qxml.h:278
QXmlSimpleReader * reader
Definition: qxml.h:393
int QXmlLocator::lineNumber ( )

Gets the line number (starting with 1) or -1 if there is no line number available.

Definition at line 292 of file qxml.cpp.

293 {
294  return ( reader->lineNr == -1 ? -1 : reader->lineNr + 1 );
295 }
QXmlSimpleReader * reader
Definition: qxml.h:393

Member Data Documentation

QXmlSimpleReader* QXmlLocator::reader
private

Definition at line 393 of file qxml.h.


The documentation for this class was generated from the following files: