|
OpenTop 1.3 | |||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
| SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD | |||||
#include "ot/sax/LocatorImpl.h"

This class is available mainly for application writers, who can use it to make a persistent snapshot of a locator at any point during a document parse:
void MyContentHandler::setLocator(Locator* pLocator)
{
// Store the locator for future ContentHandler events
m_rpLocator = pLocator;
}
void MyContentHandler::startDocument()
{
// save the location of the start of the document
// in a LocatorImpl member for future use.
m_startLoc = *m_rpLocator;
}
Normally, parser writers will not use this class, since it is more efficient to provide location information only when requested, rather than constantly updating a Locator object.
| Constructor/Destructor Summary | |
LocatorImpl()Default constructor. | |
LocatorImpl(const Locator& rhs)Copy constructor. | |
| Method Summary | |
virtual long |
getColumnNumber() constReturns the stored column number, or -1 if none is available. |
virtual long |
getLineNumber() constReturns the stored line number, or -1 if none is available. |
virtual String |
getPublicId() constReturns the stored public identifier, which may be an empty string. |
virtual String |
getSystemId() constReturns the stored system identifier, which may be an empty string. |
void |
setColumnNumber(long columnNumber)Set the column number for this locator (1-based). |
void |
setLineNumber(long lineNumber)Set the line number for this locator (1-based). |
void |
setPublicId(const String& publicId)Set the public identifier for this locator. |
void |
setSystemId(const String& systemId)Set the system identifier for this locator. |
| Methods inherited from class ot::ManagedObject |
addRef, getRefCount, onFinalRelease, operator=, release |
| Constructor/Destructor Detail |
LocatorImpl()
This will not normally be useful, since the main purpose of this class is to make a snapshot of an existing Locator.
LocatorImpl(const Locator& rhs)
Create a persistent copy of the current state of a locator. When the original locator changes, this copy will still keep the original values.
rhs - | Method Detail |
virtual long getColumnNumber() const
Note that column number is 1-based, therefore zero should never be returned.
virtual long getLineNumber() const
Note that line number is 1-based, therefore zero should never be returned.
virtual String getPublicId() const
virtual String getSystemId() const
void setColumnNumber(long columnNumber)
columnNumber - void setLineNumber(long lineNumber)
lineNumber - void setPublicId(const String& publicId)
publicId - void setSystemId(const String& systemId)
systemId -
|
OpenTop 1.3 | |||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||
| SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD | |||||