Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Locator.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------*
00002  | Library QgarLib, graphics analysis and recognition                  |
00003  | Copyright (C) 2003  Qgar Project, LORIA                             |
00004  |                                                                     |
00005  | This library is free software; you can redistribute it and/or       |
00006  | modify it under the terms of the GNU Lesser General Public          |
00007  | License version 2.1, as published by the Free Software Foundation.  |
00008  |                                                                     |
00009  | This library is distributed in the hope that it will be useful,     |
00010  | but WITHOUT ANY WARRANTY; without even the implied warranty of      |
00011  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                |
00012  | See the GNU Lesser General Public License for more details.         |
00013  |                                                                     |
00014  | The GNU Lesser General Public License is included in the file       |
00015  | LICENSE.LGPL, in the root directory of the Qgar packaging. See      |
00016  | http://www.gnu.org/licenses/lgpl.html for the terms of the license. |
00017  | To receive a paper copy, write to the Free Software Foundation,     |
00018  | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.       |
00019  |                                                                     |
00020  | Contact Project Qgar for any information:                           |
00021  |   LORIA - équipe Qgar                                               |
00022  |   B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France                |
00023  |   email: qgar-contact@loria.fr                                      |
00024  |   http://www.qgar.org/                                              |
00025  *---------------------------------------------------------------------*/
00026 
00027 
00028 #ifndef __LOCATOR_H_INCLUDED__
00029 #define __LOCATOR_H_INCLUDED__
00030 
00031 
00032 /**
00033  * @file     Locator.H
00034  * @brief    Header file of class qgxml::Locator
00035  *
00036  * @author   <a href="mailto:qgar-contact@loria.fr?subject=Qgar fwd Jan Rendek">Jan Rendek</a>
00037  * @date     March 10, 2003  14:39
00038  * @since    Qgar 2.1.1
00039  */
00040 
00041 
00042 // For RCS/CVS use: Do not delete
00043 /* $Id: Locator.H,v 1.5 2004/07/02 20:36:43 masini Exp $ */
00044 
00045 #include <string>
00046 
00047 namespace qgxml {
00048 
00049 
00050 /**
00051  * @class Locator Locator.H <qgarlib/sax/Locator.H>
00052  * @ingroup XML
00053  * @brief Interface for associating a SAX event with a document
00054  * location.
00055  *
00056  * If a SAX parser provides location information to the SAX
00057  * application, it does so by implementing this interface and then
00058  * passing an instance to the application using the content handler's
00059  * setDocumentLocator method. The application can use the object to
00060  * obtain the location of any other SAX event in the XML source
00061  * document.
00062  *
00063  * <b> This class is an adaptation for C++ of the interface of the same
00064  * name implemented in the Java SAX API (http://www.saxproject.org).
00065  * </b>
00066  * 
00067  * @author <a href="mailto:qgar-contact@loria.fr?subject=Qgar fwd Jan Rendek">Jan Rendek</a> (Adaptation).
00068  * @date   March 10, 2003  14:39
00069  * @since  Qgar 2.1.1
00070  */
00071 class Locator {
00072 
00073 // -------------------------------------------------------------------
00074 // P U B L I C    M E M B E R S
00075 // -------------------------------------------------------------------
00076 public:
00077 
00078 
00079 
00080 /** @name Destructor */
00081 //        ==========
00082 //@{
00083 /**
00084  * @brief Destructor
00085  */
00086   virtual ~Locator() 
00087   { /* EMPTY */ }
00088 //@}
00089 
00090 
00091 /** @name Access */
00092 //        ======
00093 //@{
00094 
00095 /**
00096  * @brief Return the column number where the current document event
00097  * ends.
00098  *
00099  * @return The column number.
00100  */
00101   virtual int getColumnNumber() const = 0;
00102 
00103 /**
00104  * @brief Return the line number where the current document event
00105  * ends.
00106  *
00107  * @return The line number.
00108  */
00109   virtual int getLineNumber() const = 0;
00110 
00111 /**
00112  * @brief Return the public identifier for the current document
00113  * event.
00114  *
00115  * @return A string containing the public identifier, or an empty
00116  * string if none is available.
00117  */
00118   virtual std::string getPublicId() const = 0;
00119 
00120 /**
00121  * @brief Return the system identifier for the current document
00122  * event.
00123  *
00124  * @return A string containing the system identifier, or an empty
00125  * string if none is available.
00126  */
00127   virtual std::string getSystemId() const = 0;
00128 //@}
00129 
00130 
00131 // -------------------------------------------------------------------
00132 
00133 }; // class Locator
00134 
00135 } // namespace qgxml
00136 
00137 
00138 #endif /* __LOCATOR_H_INCLUDED__ */