Xerces-C++: HandlerBase.hpp Source File

| API Docs for SAX and DOM |
| Main Page Classes Files Related Pages # HandlerBase.hpp Go to the documentation of this file.
    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: HandlerBase.hpp 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022
    00023 #ifndef HANDLERBASE_HPP
    00024 #define HANDLERBASE_HPP
    00025
    00026 #include <xercesc/sax/DocumentHandler.hpp>
    00027 #include <xercesc/sax/DTDHandler.hpp>
    00028 #include <xercesc/sax/EntityResolver.hpp>
    00029 #include <xercesc/sax/ErrorHandler.hpp>
    00030 #include <xercesc/sax/SAXParseException.hpp>
    00031
    00032 XERCES_CPP_NAMESPACE_BEGIN
    00033
    00034 class Locator;
    00035 class AttributeList;
    00036
    00057 class  HandlerBase :
    00058
    00059     public EntityResolver, public DTDHandler, public DocumentHandler
    00060     , public ErrorHandler
    00061 {
    00062 public:
    00080     virtual void characters
    00081     (
    00082         const   XMLCh* const    chars
    00083         , const unsigned int    length
    00084     );
    00085
    00098     virtual void endDocument();
    00099
    00113     virtual void endElement(const XMLCh* const name);
    00114
    00130     virtual void ignorableWhitespace
    00131     (
    00132         const   XMLCh* const    chars
    00133         , const unsigned int    length
    00134     );
    00135
    00151     virtual void processingInstruction
    00152     (
    00153         const   XMLCh* const    target
    00154         , const XMLCh* const    data
    00155     );
    00156
    00162     virtual void resetDocument();
    00164
    00179     virtual void setDocumentLocator(const Locator* const locator);
    00180
    00193     virtual void startDocument();
    00194
    00209     virtual void startElement
    00210     (
    00211         const   XMLCh* const    name
    00212         ,       AttributeList&  attributes
    00213     );
    00214
    00216
    00241     virtual InputSource* resolveEntity
    00242     (
    00243         const   XMLCh* const    publicId
    00244         , const XMLCh* const    systemId
    00245     );
    00246
    00248
    00265     virtual void error(const SAXParseException& exc);
    00266
    00284     virtual void fatalError(const SAXParseException& exc);
    00285
    00300     virtual void warning(const SAXParseException& exc);
    00301
    00307     virtual void resetErrors();
    00308
    00310
    00311
    00314
    00328     virtual void notationDecl
    00329     (
    00330         const   XMLCh* const    name
    00331         , const XMLCh* const    publicId
    00332         , const XMLCh* const    systemId
    00333     );
    00334
    00340     virtual void resetDocType();
    00341
    00356     virtual void unparsedEntityDecl
    00357     (
    00358         const   XMLCh* const    name
    00359         , const XMLCh* const    publicId
    00360         , const XMLCh* const    systemId
    00361         , const XMLCh* const    notationName
    00362     );
    00364
    00365     HandlerBase() {};
    00366     virtual ~HandlerBase() {};
    00367
    00368 private:
    00369     // -----------------------------------------------------------------------
    00370     //  Unimplemented constructors and operators
    00371     // -----------------------------------------------------------------------
    00372     HandlerBase(const HandlerBase&);
    00373     HandlerBase& operator=(const HandlerBase&);
    00374 };
    00375
    00376
    00377 // ---------------------------------------------------------------------------
    00378 //  HandlerBase: Inline default implementations
    00379 // ---------------------------------------------------------------------------
    00380 inline void HandlerBase::characters(const   XMLCh* const
    00381                                     , const unsigned int)
    00382 {
    00383 }
    00384
    00385 inline void HandlerBase::endDocument()
    00386 {
    00387 }
    00388
    00389 inline void HandlerBase::endElement(const XMLCh* const)
    00390 {
    00391 }
    00392
    00393 inline void HandlerBase::error(const SAXParseException&)
    00394 {
    00395 }
    00396
    00397 inline void HandlerBase::fatalError(const SAXParseException& exc)
    00398 {
    00399     throw exc;
    00400 }
    00401
    00402 inline void
    00403 HandlerBase::ignorableWhitespace(   const   XMLCh* const
    00404                                     , const unsigned int)
    00405 {
    00406 }
    00407
    00408 inline void HandlerBase::notationDecl(  const   XMLCh* const
    00409                                         , const XMLCh* const
    00410                                         , const XMLCh* const)
    00411 {
    00412 }
    00413
    00414 inline void
    00415 HandlerBase::processingInstruction( const   XMLCh* const
    00416                                     , const XMLCh* const)
    00417 {
    00418 }
    00419
    00420 inline void HandlerBase::resetErrors()
    00421 {
    00422 }
    00423
    00424 inline void HandlerBase::resetDocument()
    00425 {
    00426 }
    00427
    00428 inline void HandlerBase::resetDocType()
    00429 {
    00430 }
    00431
    00432 inline InputSource*
    00433 HandlerBase::resolveEntity( const   XMLCh* const
    00434                             , const XMLCh* const)
    00435 {
    00436     return 0;
    00437 }
    00438
    00439 inline void
    00440 HandlerBase::unparsedEntityDecl(const   XMLCh* const
    00441                                 , const XMLCh* const
    00442                                 , const XMLCh* const
    00443                                 , const XMLCh* const)
    00444 {
    00445 }
    00446
    00447 inline void HandlerBase::setDocumentLocator(const Locator* const)
    00448 {
    00449 }
    00450
    00451 inline void HandlerBase::startDocument()
    00452 {
    00453 }
    00454
    00455 inline void
    00456 HandlerBase::startElement(  const   XMLCh* const
    00457                             ,       AttributeList&)
    00458 {
    00459 }
    00460
    00461 inline void HandlerBase::warning(const SAXParseException&)
    00462 {
    00463 }
    00464
    00465 XERCES_CPP_NAMESPACE_END
    00466
    00467 #endif

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