http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

HandlerBase.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2000,2004 The Apache Software Foundation.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * $Log: HandlerBase.hpp,v $
00019  * Revision 1.9  2004/09/08 13:56:19  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.8  2004/01/29 11:46:32  cargilld
00023  * Code cleanup changes to get rid of various compiler diagnostic messages.
00024  *
00025  * Revision 1.7  2003/12/01 23:23:26  neilg
00026  * fix for bug 25118; thanks to Jeroen Witmond
00027  *
00028  * Revision 1.6  2003/05/30 16:11:44  gareth
00029  * Fixes so we compile under VC7.1. Patch by Alberto Massari.
00030  *
00031  * Revision 1.5  2002/11/04 14:56:25  tng
00032  * C++ Namespace Support.
00033  *
00034  * Revision 1.4  2002/07/16 18:15:00  tng
00035  * [Bug 6070] warning unused variable in HandlerBase.hpp
00036  *
00037  * Revision 1.3  2002/06/06 20:39:16  tng
00038  * Document Fix: document that the returned object from resolveEntity is owned by the parser
00039  *
00040  * Revision 1.2  2002/02/20 18:17:01  tng
00041  * [Bug 5977] Warnings on generating apiDocs.
00042  *
00043  * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
00044  * sane_include
00045  *
00046  * Revision 1.6  2000/03/02 19:54:35  roddey
00047  * This checkin includes many changes done while waiting for the
00048  * 1.1.0 code to be finished. I can't list them all here, but a list is
00049  * available elsewhere.
00050  *
00051  * Revision 1.5  2000/02/24 20:12:55  abagchi
00052  * Swat for removing Log from API docs
00053  *
00054  * Revision 1.4  2000/02/12 03:31:55  rahulj
00055  * Removed duplicate CVS Log entries.
00056  *
00057  * Revision 1.3  2000/02/12 01:27:19  aruna1
00058  * Documentation updated
00059  *
00060  * Revision 1.2  2000/02/06 07:47:57  rahulj
00061  * Year 2K copyright swat.
00062  *
00063  * Revision 1.1.1.1  1999/11/09 01:07:45  twl
00064  * Initial checkin
00065  *
00066  * Revision 1.2  1999/11/08 20:45:00  rahul
00067  * Swat for adding in Product name and CVS comment log variable.
00068  *
00069  */
00070 
00071 
00072 #ifndef HANDLERBASE_HPP
00073 #define HANDLERBASE_HPP
00074 
00075 #include <xercesc/sax/DocumentHandler.hpp>
00076 #include <xercesc/sax/DTDHandler.hpp>
00077 #include <xercesc/sax/EntityResolver.hpp>
00078 #include <xercesc/sax/ErrorHandler.hpp>
00079 #include <xercesc/sax/SAXParseException.hpp>
00080 
00081 XERCES_CPP_NAMESPACE_BEGIN
00082 
00083 class Locator;
00084 class AttributeList;
00085 
00106 class  HandlerBase :
00107 
00108     public EntityResolver, public DTDHandler, public DocumentHandler
00109     , public ErrorHandler
00110 {
00111 public:
00129     virtual void characters
00130     (
00131         const   XMLCh* const    chars
00132         , const unsigned int    length
00133     );
00134 
00147     virtual void endDocument();
00148 
00162     virtual void endElement(const XMLCh* const name);
00163 
00179     virtual void ignorableWhitespace
00180     (
00181         const   XMLCh* const    chars
00182         , const unsigned int    length
00183     );
00184 
00200     virtual void processingInstruction
00201     (
00202         const   XMLCh* const    target
00203         , const XMLCh* const    data
00204     );
00205 
00211     virtual void resetDocument();
00213 
00228     virtual void setDocumentLocator(const Locator* const locator);
00229 
00242     virtual void startDocument();
00243 
00258     virtual void startElement
00259     (
00260         const   XMLCh* const    name
00261         ,       AttributeList&  attributes
00262     );
00263 
00265 
00290     virtual InputSource* resolveEntity
00291     (
00292         const   XMLCh* const    publicId
00293         , const XMLCh* const    systemId
00294     );
00295 
00297 
00314     virtual void error(const SAXParseException& exc);
00315 
00333     virtual void fatalError(const SAXParseException& exc);
00334 
00349     virtual void warning(const SAXParseException& exc);
00350 
00356     virtual void resetErrors();
00357 
00359 
00360 
00363 
00377     virtual void notationDecl
00378     (
00379         const   XMLCh* const    name
00380         , const XMLCh* const    publicId
00381         , const XMLCh* const    systemId
00382     );
00383 
00389     virtual void resetDocType();
00390 
00405     virtual void unparsedEntityDecl
00406     (
00407         const   XMLCh* const    name
00408         , const XMLCh* const    publicId
00409         , const XMLCh* const    systemId
00410         , const XMLCh* const    notationName
00411     );
00413 
00414     HandlerBase() {};
00415     virtual ~HandlerBase() {};
00416 
00417 private:
00418     // -----------------------------------------------------------------------
00419     //  Unimplemented constructors and operators
00420     // -----------------------------------------------------------------------
00421     HandlerBase(const HandlerBase&);
00422     HandlerBase& operator=(const HandlerBase&);
00423 };
00424 
00425 
00426 // ---------------------------------------------------------------------------
00427 //  HandlerBase: Inline default implementations
00428 // ---------------------------------------------------------------------------
00429 inline void HandlerBase::characters(const   XMLCh* const
00430                                     , const unsigned int)
00431 {
00432 }
00433 
00434 inline void HandlerBase::endDocument()
00435 {
00436 }
00437 
00438 inline void HandlerBase::endElement(const XMLCh* const)
00439 {
00440 }
00441 
00442 inline void HandlerBase::error(const SAXParseException&)
00443 {
00444 }
00445 
00446 inline void HandlerBase::fatalError(const SAXParseException& exc)
00447 {
00448     throw exc;
00449 }
00450 
00451 inline void
00452 HandlerBase::ignorableWhitespace(   const   XMLCh* const
00453                                     , const unsigned int)
00454 {
00455 }
00456 
00457 inline void HandlerBase::notationDecl(  const   XMLCh* const
00458                                         , const XMLCh* const
00459                                         , const XMLCh* const)
00460 {
00461 }
00462 
00463 inline void
00464 HandlerBase::processingInstruction( const   XMLCh* const
00465                                     , const XMLCh* const)
00466 {
00467 }
00468 
00469 inline void HandlerBase::resetErrors()
00470 {
00471 }
00472 
00473 inline void HandlerBase::resetDocument()
00474 {
00475 }
00476 
00477 inline void HandlerBase::resetDocType()
00478 {
00479 }
00480 
00481 inline InputSource*
00482 HandlerBase::resolveEntity( const   XMLCh* const
00483                             , const XMLCh* const)
00484 {
00485     return 0;
00486 }
00487 
00488 inline void
00489 HandlerBase::unparsedEntityDecl(const   XMLCh* const
00490                                 , const XMLCh* const
00491                                 , const XMLCh* const
00492                                 , const XMLCh* const)
00493 {
00494 }
00495 
00496 inline void HandlerBase::setDocumentLocator(const Locator* const)
00497 {
00498 }
00499 
00500 inline void HandlerBase::startDocument()
00501 {
00502 }
00503 
00504 inline void
00505 HandlerBase::startElement(  const   XMLCh* const
00506                             ,       AttributeList&)
00507 {
00508 }
00509 
00510 inline void HandlerBase::warning(const SAXParseException&)
00511 {
00512 }
00513 
00514 XERCES_CPP_NAMESPACE_END
00515 
00516 #endif


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.