Locator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Locator.h
00006  *
00007  *  Locator.h,v 1.7 2005/04/20 16:22:53 ossama Exp
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef _ACEXML_LOCATOR_H_
00014 #define _ACEXML_LOCATOR_H_
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "ACEXML/common/ACEXML_Export.h"
00018 #include "ACEXML/common/XML_Types.h"
00019 
00020 /**
00021  * @class ACEXML_Locator Locator.h "ACEXML/common/Locator.h"
00022  *
00023  * @brief ACEXML_Locator defines operations that an XML locator should support.
00024  *
00025  * If a SAX parser provides location information to the SAX
00026  * application, it does so by implementing this interface and then
00027  * passing an instance to the application using the content handler's
00028  * setDocumentLocator method. The application can use the object to
00029  * obtain the location of any other content handler event in the XML
00030  * source document.
00031  *
00032  * Note that the results returned by the object will be valid only
00033  * during the scope of each content handler method: the application
00034  * will receive unpredictable results if it attempts to use the
00035  * locator at any other time.
00036  *
00037  * SAX parsers are not required to supply a locator, but they are very
00038  * strongly encouraged to do so. If the parser supplies a locator, it
00039  * must do so before reporting any other document events. If no
00040  * locator has been set by the time the application receives the
00041  * startDocument event, the application should assume that a locator
00042  * is not available.
00043  */
00044 class ACEXML_Export ACEXML_Locator
00045 {
00046 public:
00047 
00048   virtual ~ACEXML_Locator (void);
00049 
00050   /*
00051    * Return the column number where the current document event ends.
00052    */
00053   virtual int getColumnNumber (void) const = 0;
00054 
00055   /*
00056    * Return the line number where the current document event ends.
00057    */
00058   virtual int getLineNumber (void) const = 0;
00059 
00060   /*
00061    * Return the public identifier for the current document event.
00062    */
00063   virtual const ACEXML_Char *getPublicId (void) const = 0;
00064 
00065   /*
00066    * Return the system identifier for the current document event.
00067    */
00068   virtual const ACEXML_Char *getSystemId (void) const = 0;
00069 };
00070 
00071 
00072 #include /**/ "ace/post.h"
00073 
00074 #endif /* _ACEXML_LOCATOR_H_ */

Generated on Thu Nov 9 11:45:37 2006 for ACEXML by doxygen 1.3.6