source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/sax2/LexicalHandler.hpp @ 2674

Revision 2674, 5.1 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: LexicalHandler.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22
23#ifndef LEXICALHANDLER_HPP
24#define LEXICALHANDLER_HPP
25
26#include <xercesc/util/XercesDefs.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30/**
31  * Receive notification of lexical events.
32  *
33  * <p>This is an extension handler for that provides lexical information
34  * about an XML document.  It does not provide information about document
35  * content.  For those events, an application must register an instance of
36  * a ContentHandler.</p>
37  *
38  * <p>The order of events in this interface is very important, and
39  * mirrors the order of information in the document itself.  For
40  * example, startDTD() and endDTD() events will occur before the
41  * first element in the document.</p>
42  *
43  * @see SAX2XMLReader#setLexicalHandler
44  * @see SAX2XMLReader#setContentHandler
45  */
46
47class SAX2_EXPORT LexicalHandler
48{
49public:
50    /** @name Constructors and Destructor */
51    //@{
52    /** Default constructor */
53    LexicalHandler()
54    {
55    }
56
57    /** Destructor */
58    virtual ~LexicalHandler()
59    {
60    }
61    //@}
62
63    /** @name The virtual document handler interface */
64
65    //@{
66   /**
67    * Receive notification of comments.
68    *
69    * <p>The Parser will call this method to report each occurence of
70    * a comment in the XML document.</p>
71    *
72    * <p>The application must not attempt to read from the array
73    * outside of the specified range.</p>
74    *
75    * @param chars The characters from the XML document.
76    * @param length The number of characters to read from the array.
77    * @exception SAXException Any SAX exception, possibly
78    *            wrapping another exception.
79    */
80    virtual void comment
81    (
82        const   XMLCh* const    chars
83        , const unsigned int    length
84    ) = 0;
85
86  /**
87    * Receive notification of the end of a CDATA section.
88    *
89    * <p>The SAX parser will invoke this method at the end of
90    * each CDATA parsed.</p>
91    *
92    * @exception SAXException Any SAX exception, possibly
93    *            wrapping another exception.
94    */
95    virtual void endCDATA () = 0;
96
97  /**
98    * Receive notification of the end of the DTD declarations.
99    *
100    * <p>The SAX parser will invoke this method at the end of the
101    * DTD</p>
102    *
103    * @exception SAXException Any SAX exception, possibly
104    *            wrapping another exception.
105    */
106    virtual void endDTD () = 0;
107
108  /**
109    * Receive notification of the end of an entity.
110    *
111    * <p>The SAX parser will invoke this method at the end of an
112    * entity</p>
113    *
114    * @param name The name of the entity that is ending.
115    * @exception SAXException Any SAX exception, possibly
116    *            wrapping another exception.
117    */
118    virtual void endEntity (const XMLCh* const name) = 0;
119
120  /**
121    * Receive notification of the start of a CDATA section.
122    *
123    * <p>The SAX parser will invoke this method at the start of
124    * each CDATA parsed.</p>
125    *
126    * @exception SAXException Any SAX exception, possibly
127    *            wrapping another exception.
128    */
129    virtual void startCDATA () = 0;
130
131  /**
132    * Receive notification of the start of the DTD declarations.
133    *
134    * <p>The SAX parser will invoke this method at the start of the
135    * DTD</p>
136    *
137    * @param name The document type name.
138    * @param publicId The declared public identifier for the external DTD subset, or null if none was declared.
139    * @param systemId The declared system identifier for the external DTD subset, or null if none was declared.
140    * @exception SAXException Any SAX exception, possibly
141    *            wrapping another exception.
142    */
143    virtual void startDTD
144    (
145        const   XMLCh* const    name
146        , const   XMLCh* const    publicId
147        , const   XMLCh* const    systemId
148    ) = 0;
149
150  /**
151    * Receive notification of the start of an entity.
152    *
153    * <p>The SAX parser will invoke this method at the start of an
154    * entity</p>
155    *
156    * @param name The name of the entity that is starting.
157    * @exception SAXException Any SAX exception, possibly
158    *            wrapping another exception.
159    */
160    virtual void startEntity (const XMLCh* const name) = 0;
161
162    //@}
163private :
164    /* Unimplemented Constructors and operators */
165    /* Copy constructor */
166    LexicalHandler(const LexicalHandler&);
167    /** Assignment operator */
168    LexicalHandler& operator=(const LexicalHandler&);
169};
170
171XERCES_CPP_NAMESPACE_END
172
173#endif
Note: See TracBrowser for help on using the repository browser.