Xerces-C++ 3.2.5
HandlerBase.hpp
Go to the documentation of this file.
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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_HANDLERBASE_HPP)
23#define XERCESC_INCLUDE_GUARD_HANDLERBASE_HPP
24
30
32
33class Locator;
34class AttributeList;
35
57
58 public EntityResolver, public DTDHandler, public DocumentHandler
59 , public ErrorHandler
60{
61public:
79 virtual void characters
80 (
81 const XMLCh* const chars
82 , const XMLSize_t length
83 );
84
97 virtual void endDocument();
98
112 virtual void endElement(const XMLCh* const name);
113
129 virtual void ignorableWhitespace
130 (
131 const XMLCh* const chars
132 , const XMLSize_t length
133 );
134
150 virtual void processingInstruction
151 (
152 const XMLCh* const target
153 , const XMLCh* const data
154 );
155
161 virtual void resetDocument();
163
178 virtual void setDocumentLocator(const Locator* const locator);
179
192 virtual void startDocument();
193
208 virtual void startElement
209 (
210 const XMLCh* const name
211 , AttributeList& attributes
212 );
213
215
241 (
242 const XMLCh* const publicId
243 , const XMLCh* const systemId
244 );
245
247
264 virtual void error(const SAXParseException& exc);
265
283 virtual void fatalError(const SAXParseException& exc);
284
299 virtual void warning(const SAXParseException& exc);
300
306 virtual void resetErrors();
307
309
310
313
327 virtual void notationDecl
328 (
329 const XMLCh* const name
330 , const XMLCh* const publicId
331 , const XMLCh* const systemId
332 );
333
339 virtual void resetDocType();
340
355 virtual void unparsedEntityDecl
356 (
357 const XMLCh* const name
358 , const XMLCh* const publicId
359 , const XMLCh* const systemId
360 , const XMLCh* const notationName
361 );
363
365 virtual ~HandlerBase() {};
366
367private:
368 // -----------------------------------------------------------------------
369 // Unimplemented constructors and operators
370 // -----------------------------------------------------------------------
371 HandlerBase(const HandlerBase&);
372 HandlerBase& operator=(const HandlerBase&);
373};
374
375
376// ---------------------------------------------------------------------------
377// HandlerBase: Inline default implementations
378// ---------------------------------------------------------------------------
379inline void HandlerBase::characters(const XMLCh* const
380 , const XMLSize_t)
381{
382}
383
385{
386}
387
388inline void HandlerBase::endElement(const XMLCh* const)
389{
390}
391
393{
394}
395
397{
398 throw exc;
399}
400
401inline void
403 , const XMLSize_t)
404{
405}
406
407inline void HandlerBase::notationDecl( const XMLCh* const
408 , const XMLCh* const
409 , const XMLCh* const)
410{
411}
412
413inline void
415 , const XMLCh* const)
416{
417}
418
420{
421}
422
424{
425}
426
428{
429}
430
431inline InputSource*
433 , const XMLCh* const)
434{
435 return 0;
436}
437
438inline void
440 , const XMLCh* const
441 , const XMLCh* const
442 , const XMLCh* const)
443{
444}
445
447{
448}
449
451{
452}
453
454inline void
456 , AttributeList&)
457{
458}
459
461{
462}
463
465
466#endif
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define SAX_EXPORT
Definition XercesDefs.hpp:164
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
uint16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
Interface for an element's attribute specifications.
Definition AttributeList.hpp:81
Receive notification of basic DTD-related events.
Definition DTDHandler.hpp:60
virtual void resetDocType()=0
Reset the DocType object on its reuse.
virtual void unparsedEntityDecl(const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const notationName)=0
Receive notification of an unparsed entity declaration event.
virtual void notationDecl(const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId)=0
Receive notification of a notation declaration event.
Receive notification of general document events.
Definition DocumentHandler.hpp:61
virtual void characters(const XMLCh *const chars, const XMLSize_t length)=0
Receive notification of character data.
virtual void startElement(const XMLCh *const name, AttributeList &attrs)=0
Receive notification of the beginning of an element.
virtual void startDocument()=0
Receive notification of the beginning of a document.
virtual void processingInstruction(const XMLCh *const target, const XMLCh *const data)=0
Receive notification of a processing instruction.
virtual void endDocument()=0
Receive notification of the end of a document.
virtual void resetDocument()=0
Reset the Document object on its reuse.
virtual void endElement(const XMLCh *const name)=0
Receive notification of the end of an element.
virtual void setDocumentLocator(const Locator *const locator)=0
Receive an object for locating the origin of SAX document events.
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length)=0
Receive notification of ignorable whitespace in element content.
Basic interface for resolving entities.
Definition EntityResolver.hpp:87
virtual InputSource * resolveEntity(const XMLCh *const publicId, const XMLCh *const systemId)=0
Allow the application to resolve external entities.
Basic interface for SAX error handlers.
Definition ErrorHandler.hpp:61
virtual void warning(const SAXParseException &exc)=0
Receive notification of a warning.
virtual void fatalError(const SAXParseException &exc)=0
Receive notification of a non-recoverable error.
virtual void resetErrors()=0
Reset the Error handler object on its reuse.
virtual void error(const SAXParseException &exc)=0
Receive notification of a recoverable error.
Default base class for handlers.
Definition HandlerBase.hpp:60
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length)
Receive notification of ignorable whitespace in element content.
Definition HandlerBase.hpp:402
virtual void endDocument()
Receive notification of the end of the document.
Definition HandlerBase.hpp:384
virtual void resetDocType()
Reset the DTD object on its reuse.
Definition HandlerBase.hpp:427
virtual void resetDocument()
Reset the Document object on its reuse.
Definition HandlerBase.hpp:423
virtual void unparsedEntityDecl(const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const notationName)
Receive notification of an unparsed entity declaration.
Definition HandlerBase.hpp:439
virtual ~HandlerBase()
Definition HandlerBase.hpp:365
virtual void startElement(const XMLCh *const name, AttributeList &attributes)
Receive notification of the start of an element.
Definition HandlerBase.hpp:455
virtual void startDocument()
Receive notification of the beginning of the document.
Definition HandlerBase.hpp:450
virtual void notationDecl(const XMLCh *const name, const XMLCh *const publicId, const XMLCh *const systemId)
Receive notification of a notation declaration.
Definition HandlerBase.hpp:407
virtual void characters(const XMLCh *const chars, const XMLSize_t length)
Receive notification of character data inside an element.
Definition HandlerBase.hpp:379
virtual void error(const SAXParseException &exc)
Receive notification of a recoverable parser error.
Definition HandlerBase.hpp:392
virtual void fatalError(const SAXParseException &exc)
Report a fatal XML parsing error.
Definition HandlerBase.hpp:396
virtual void processingInstruction(const XMLCh *const target, const XMLCh *const data)
Receive notification of a processing instruction.
Definition HandlerBase.hpp:414
HandlerBase()
Definition HandlerBase.hpp:364
virtual void endElement(const XMLCh *const name)
Receive notification of the end of an element.
Definition HandlerBase.hpp:388
virtual InputSource * resolveEntity(const XMLCh *const publicId, const XMLCh *const systemId)
Resolve an external entity.
Definition HandlerBase.hpp:432
virtual void resetErrors()
Reset the Error handler object on its reuse.
Definition HandlerBase.hpp:419
virtual void warning(const SAXParseException &exc)
Receive notification of a parser warning.
Definition HandlerBase.hpp:460
virtual void setDocumentLocator(const Locator *const locator)
Receive a Locator object for document events.
Definition HandlerBase.hpp:446
A single input source for an XML entity.
Definition InputSource.hpp:63
Interface for associating a SAX event with a document location.
Definition Locator.hpp:55
Encapsulate an XML parse error or warning.
Definition SAXParseException.hpp:49