Xerces-C++: HandlerBase.hpp Source File

| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # 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  * $Id: HandlerBase.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021
    00022 #ifndef HANDLERBASE_HPP
    00023 #define HANDLERBASE_HPP
    00024
    00025 #include <xercesc/sax/DocumentHandler.hpp>
    00026 #include <xercesc/sax/DTDHandler.hpp>
    00027 #include <xercesc/sax/EntityResolver.hpp>
    00028 #include <xercesc/sax/ErrorHandler.hpp>
    00029 #include <xercesc/sax/SAXParseException.hpp>
    00030
    00031 XERCES_CPP_NAMESPACE_BEGIN
    00032
    00033 class Locator;
    00034 class AttributeList;
    00035
    00056 class  HandlerBase :
    00057
    00058     public EntityResolver, public DTDHandler, public DocumentHandler
    00059     , public ErrorHandler
    00060 {
    00061 public:
    00079     virtual void characters
    00080     (
    00081         const   XMLCh* const    chars
    00082         , const unsigned int    length
    00083     );
    00084
    00097     virtual void endDocument();
    00098
    00112     virtual void endElement(const XMLCh* const name);
    00113
    00129     virtual void ignorableWhitespace
    00130     (
    00131         const   XMLCh* const    chars
    00132         , const unsigned int    length
    00133     );
    00134
    00150     virtual void processingInstruction
    00151     (
    00152         const   XMLCh* const    target
    00153         , const XMLCh* const    data
    00154     );
    00155
    00161     virtual void resetDocument();
    00163
    00178     virtual void setDocumentLocator(const Locator* const locator);
    00179
    00192     virtual void startDocument();
    00193
    00208     virtual void startElement
    00209     (
    00210         const   XMLCh* const    name
    00211         ,       AttributeList&  attributes
    00212     );
    00213
    00215
    00240     virtual InputSource* resolveEntity
    00241     (
    00242         const   XMLCh* const    publicId
    00243         , const XMLCh* const    systemId
    00244     );
    00245
    00247
    00264     virtual void error(const SAXParseException& exc);
    00265
    00283     virtual void fatalError(const SAXParseException& exc);
    00284
    00299     virtual void warning(const SAXParseException& exc);
    00300
    00306     virtual void resetErrors();
    00307
    00309
    00310
    00313
    00327     virtual void notationDecl
    00328     (
    00329         const   XMLCh* const    name
    00330         , const XMLCh* const    publicId
    00331         , const XMLCh* const    systemId
    00332     );
    00333
    00339     virtual void resetDocType();
    00340
    00355     virtual void unparsedEntityDecl
    00356     (
    00357         const   XMLCh* const    name
    00358         , const XMLCh* const    publicId
    00359         , const XMLCh* const    systemId
    00360         , const XMLCh* const    notationName
    00361     );
    00363
    00364     HandlerBase() {};
    00365     virtual ~HandlerBase() {};
    00366
    00367 private:
    00368     // -----------------------------------------------------------------------
    00369     //  Unimplemented constructors and operators
    00370     // -----------------------------------------------------------------------
    00371     HandlerBase(const HandlerBase&);
    00372     HandlerBase& operator=(const HandlerBase&);
    00373 };
    00374
    00375
    00376 // ---------------------------------------------------------------------------
    00377 //  HandlerBase: Inline default implementations
    00378 // ---------------------------------------------------------------------------
    00379 inline void HandlerBase::characters(const   XMLCh* const
    00380                                     , const unsigned int)
    00381 {
    00382 }
    00383
    00384 inline void HandlerBase::endDocument()
    00385 {
    00386 }
    00387
    00388 inline void HandlerBase::endElement(const XMLCh* const)
    00389 {
    00390 }
    00391
    00392 inline void HandlerBase::error(const SAXParseException&)
    00393 {
    00394 }
    00395
    00396 inline void HandlerBase::fatalError(const SAXParseException& exc)
    00397 {
    00398     throw exc;
    00399 }
    00400
    00401 inline void
    00402 HandlerBase::ignorableWhitespace(   const   XMLCh* const
    00403                                     , const unsigned int)
    00404 {
    00405 }
    00406
    00407 inline void HandlerBase::notationDecl(  const   XMLCh* const
    00408                                         , const XMLCh* const
    00409                                         , const XMLCh* const)
    00410 {
    00411 }
    00412
    00413 inline void
    00414 HandlerBase::processingInstruction( const   XMLCh* const
    00415                                     , const XMLCh* const)
    00416 {
    00417 }
    00418
    00419 inline void HandlerBase::resetErrors()
    00420 {
    00421 }
    00422
    00423 inline void HandlerBase::resetDocument()
    00424 {
    00425 }
    00426
    00427 inline void HandlerBase::resetDocType()
    00428 {
    00429 }
    00430
    00431 inline InputSource*
    00432 HandlerBase::resolveEntity( const   XMLCh* const
    00433                             , const XMLCh* const)
    00434 {
    00435     return 0;
    00436 }
    00437
    00438 inline void
    00439 HandlerBase::unparsedEntityDecl(const   XMLCh* const
    00440                                 , const XMLCh* const
    00441                                 , const XMLCh* const
    00442                                 , const XMLCh* const)
    00443 {
    00444 }
    00445
    00446 inline void HandlerBase::setDocumentLocator(const Locator* const)
    00447 {
    00448 }
    00449
    00450 inline void HandlerBase::startDocument()
    00451 {
    00452 }
    00453
    00454 inline void
    00455 HandlerBase::startElement(  const   XMLCh* const
    00456                             ,       AttributeList&)
    00457 {
    00458 }
    00459
    00460 inline void HandlerBase::warning(const SAXParseException&)
    00461 {
    00462 }
    00463
    00464 XERCES_CPP_NAMESPACE_END
    00465
    00466 #endif

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