Unicorn XML Toolkit
Version 1.50.00

Namespace Sax
Class CLocatorImpl

class CLocatorImpl: public CLocator {
public:
    CLocatorImpl();
    CLocatorImpl(CLocator *pLocator);
    ~CLocatorImpl();
public:
    const WCHAR *GetPublicId();
    const WCHAR *GetSystemId();
    int GetLineNumber();
    int GetColumnNumber();
public:
    void SetPublicId(const WCHAR *pszPublicId);
    void SetSystemId(const WCHAR *pszSystemId);
    void SetLineNumber(int nLineNumber);
    void SetColumnNumber(int nColumnNumber);
    };

The optional convenience implementation of the locator.

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 reding session:

Normally, reader developers will not use this class, since it is more efficient to provide location information only when requested, rather than constantly updating a locator object.

Since:
1.00.00
Version:
1.50.00
Author:
C++ interfaces by Alexey Gokhberg; based on the original SAX2 specification by David Megginson
See Also:
CLocator
Constructor/Destructor Summary
CLocatorImpl ();
����������Constructs the locator.
CLocatorImpl (CLocator *pLocator);
����������Constructs the locator.
~CLocatorImpl ();
����������Destroys the locator.

Function Summary
const�WCHAR�* GetPublicId ();
����������Gets the saved public identifier.
const�WCHAR�* GetSystemId ();
����������Gets the saved system identifier.
int GetLineNumber ();
����������Gets the saved line number (1-based).
int GetColumnNumber ();
����������Gets the saved column number (1-based).
void SetPublicId (const WCHAR *pszPublicId);
����������Sets the public identifier for this locator.
void SetSystemId (const WCHAR *pszSystemId);
����������Sets the system identifier for this locator.
void SetLineNumber (int nLineNumber);
����������Sets the line number for this locator (1-based).
void SetColumnNumber (int nColumnNumber);
����������Sets the column number for this locator (1-based).

Constructor/Destructor Detail

CLocatorImpl

CLocatorImpl();

Constructs the locator.

This is a zero-argument constructor.

This will not normally be useful, since the main purpose of this class is to make a snapshot of an existing locator.

CLocatorImpl

CLocatorImpl(CLocator *pLocator);

Constructs the locator.

This is a copy constructor.

It creates a persistent copy of the current state of a locator. When the original locator changes, this copy will still keep the original values (and it can be used outside the scope of document handler methods).

Parameters:
pLocator - the locator to copy

~CLocatorImpl

~CLocatorImpl();

Destroys the locator.

Function Detail

GetPublicId

const WCHAR *GetPublicId();

Gets the saved public identifier.

Returns:
the public identifier as a string, or the empty string if none is available

GetSystemId

const WCHAR *GetSystemId();

Gets the saved system identifier.

Returns:
the system identifier as a string, or the empty string if none is available

GetLineNumber

int GetLineNumber();

Gets the saved line number (1-based).

Returns:
the line number as an integer, or -1 if none is available

GetColumnNumber

int GetColumnNumber();

Gets the saved column number (1-based).

Returns:
the column number as an integer, or -1 if none is available

SetPublicId

void SetPublicId(const WCHAR *pszPublicId);

Sets the public identifier for this locator.

Parameters:
pszPublicId - the new public identifier, or the empty string if none is available

SetSystemId

void SetSystemId(const WCHAR *pszSystemId);

Sets the system identifier for this locator.

Parameters:
pszSystemId - the new system identifier, or the empty string if none is available

SetLineNumber

void SetLineNumber(int nLineNumber);

Sets the line number for this locator (1-based).

Parameters:
nLineNumber - the line number, or -1 if none is available

SetColumnNumber

void SetColumnNumber(int nColumnNumber);

Sets the column number for this locator (1-based).

Parameters:
nColumnNumber - the column number, or -1 if none is available

Unicorn XML Toolkit
Version 1.50.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.