#include <ACEXML/common/LocatorImpl.h>
Inheritance diagram for ACEXML_LocatorImpl:


| Public Member Functions | |
| ACEXML_LocatorImpl (void) | |
| ACEXML_LocatorImpl (const ACEXML_Char *systemId, const ACEXML_Char *publicId) | |
| ACEXML_LocatorImpl (const ACEXML_Locator &locator) | |
| virtual | ~ACEXML_LocatorImpl (void) | 
| virtual int | getColumnNumber (void) const | 
| virtual int | getLineNumber (void) const | 
| virtual const ACEXML_Char * | getPublicId (void) const | 
| virtual const ACEXML_Char * | getSystemId (void) const | 
| void | setColumnNumber (int cn) | 
| void | setLineNumber (int ln) | 
| void | setPublicId (const ACEXML_Char *id) | 
| void | setSystemId (const ACEXML_Char *id) | 
| void | incrLineNumber () | 
| void | incrColumnNumber () | 
| void | reset (void) | 
| Private Attributes | |
| ACEXML_Char * | publicId_ | 
| ACEXML_Char * | systemId_ | 
| int | lineNumber_ | 
| int | columnNumber_ | 
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:
ACEXML_Locator locator; ACEXML_Locator startloc; public void setLocator (ACEXML_Locator locator) { // note the locator this.locator = locator; } public void startDocument () { // save the location of the start of the document // for future use. ACEXML_Locator startloc = new ACEXML_LocatorImpl(locator); }
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.
Definition at line 61 of file LocatorImpl.h.
| 
 | 
| 
 Definition at line 9 of file LocatorImpl.cpp. 
 00010 : publicId_ (0), 00011 systemId_ (0), 00012 lineNumber_ (1), 00013 columnNumber_ (0) 00014 { 00015 } | 
| 
 | ||||||||||||
| Construct a locator with systemId and publicId Definition at line 17 of file LocatorImpl.cpp. References ACEXML_Char. 
 00019 : publicId_ (publicId ? ACE::strnew (publicId) : 0), 00020 systemId_ (systemId ? ACE::strnew (systemId) : 0), 00021 lineNumber_ (1), 00022 columnNumber_ (0) 00023 { 00024 } | 
| 
 | 
| Copy constructor. Create 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 DocumentHandler methods). Definition at line 27 of file LocatorImpl.cpp. 
 00028 : publicId_ (locator.getPublicId() ? ACE::strnew(locator.getPublicId ()): 0), 00029 systemId_ (locator.getSystemId() ? ACE::strnew(locator.getSystemId ()): 0), 00030 lineNumber_ (locator.getLineNumber ()), 00031 columnNumber_ (locator.getColumnNumber ()) 00032 { 00033 } | 
| 
 | 
| 
 Definition at line 35 of file LocatorImpl.cpp. References reset(). 
 00036 {
00037   this->reset();
00038 }
 | 
| 
 | 
| 
 Implements ACEXML_Locator. Definition at line 18 of file LocatorImpl.i. References columnNumber_. 
 00019 {
00020   return this->columnNumber_;
00021 }
 | 
| 
 | 
| 
 Implements ACEXML_Locator. Definition at line 24 of file LocatorImpl.i. References lineNumber_. 
 00025 {
00026   return this->lineNumber_;
00027 }
 | 
| 
 | 
| 
 Implements ACEXML_Locator. Definition at line 44 of file LocatorImpl.i. 
 00045 {
00046   return this->publicId_;
00047 }
 | 
| 
 | 
| 
 Implements ACEXML_Locator. Definition at line 50 of file LocatorImpl.i. Referenced by ACEXML_Parser::normalize_systemid(). 
 00051 {
00052   return this->systemId_;
00053 }
 | 
| 
 | 
| 
 Definition at line 62 of file LocatorImpl.i. References columnNumber_. Referenced by ACEXML_Parser::get(). 
 00063 {
00064   ++this->columnNumber_;
00065 }
 | 
| 
 | 
| 
 Definition at line 56 of file LocatorImpl.i. References lineNumber_. Referenced by ACEXML_Parser::get(). 
 00057 {
00058   ++this->lineNumber_;
00059 }
 | 
| 
 | 
| 
 Definition at line 41 of file LocatorImpl.cpp. References columnNumber_, and lineNumber_. Referenced by ~ACEXML_LocatorImpl(). 
 00042 {
00043   delete[] this->publicId_;
00044   this->publicId_ = 0;
00045   delete[] this->systemId_;
00046   this->systemId_ = 0;
00047   this->columnNumber_ = 0;
00048   this->lineNumber_ = 1;
00049 }
 | 
| 
 | 
| 
 Definition at line 6 of file LocatorImpl.i. References columnNumber_. Referenced by ACEXML_Parser::get(). 
 00007 {
00008   this->columnNumber_ = cn;
00009 }
 | 
| 
 | 
| 
 Definition at line 12 of file LocatorImpl.i. References lineNumber_. 
 00013 {
00014   this->lineNumber_ = ln;
00015 }
 | 
| 
 | 
| 
 Definition at line 30 of file LocatorImpl.i. References ACEXML_Char, and ACE::strnew(). 
 00031 {
00032   delete[] this->publicId_;
00033   this->publicId_ = ACE::strnew (id);
00034 }
 | 
| 
 | 
| 
 Definition at line 37 of file LocatorImpl.i. References ACEXML_Char, and ACE::strnew(). 
 00038 {
00039   delete[] this->systemId_;
00040   this->systemId_ = ACE::strnew (id);
00041 }
 | 
| 
 | 
| 
 Definition at line 150 of file LocatorImpl.h. Referenced by getColumnNumber(), incrColumnNumber(), reset(), and setColumnNumber(). | 
| 
 | 
| 
 Definition at line 149 of file LocatorImpl.h. Referenced by getLineNumber(), incrLineNumber(), reset(), and setLineNumber(). | 
| 
 | 
| 
 Definition at line 147 of file LocatorImpl.h. | 
| 
 | 
| 
 Definition at line 148 of file LocatorImpl.h. | 
 1.3.6
 
1.3.6