Xerces-C++ 3.1.3

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

DefaultHandler.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: DefaultHandler.hpp 932887 2010-04-11 13:04:59Z borisk $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_DEFAULTHANDLER_HPP)
23 #define XERCESC_INCLUDE_GUARD_DEFAULTHANDLER_HPP
24
25 #include <xercesc/sax2/ContentHandler.hpp>
26 #include <xercesc/sax2/LexicalHandler.hpp>
27 #include <xercesc/sax2/DeclHandler.hpp>
28 #include <xercesc/sax/DTDHandler.hpp>
29 #include <xercesc/sax/EntityResolver.hpp>
30 #include <xercesc/sax/ErrorHandler.hpp>
31 #include <xercesc/sax/SAXParseException.hpp>
32
33 XERCES_CPP_NAMESPACE_BEGIN
34
35 class Locator;
36 class Attributes;
37
60 class SAX2_EXPORT DefaultHandler :
61
62 public EntityResolver,
63 public DTDHandler,
64 public ContentHandler,
65 public ErrorHandler,
66 public LexicalHandler,
67 public DeclHandler
68 {
69 public:
87 virtual void characters
88 (
89 const XMLCh* const chars
90 , const XMLSize_t length
91 );
92
105 virtual void endDocument();
106
122 virtual void endElement
123 (
124 const XMLCh* const uri,
125 const XMLCh* const localname,
126 const XMLCh* const qname
127 );
128
144 virtual void ignorableWhitespace
145 (
146 const XMLCh* const chars
147 , const XMLSize_t length
148 );
149
165 virtual void processingInstruction
166 (
167 const XMLCh* const target
168 , const XMLCh* const data
169 );
170
176 virtual void resetDocument();
178
193 virtual void setDocumentLocator(const Locator* const locator);
194
207 virtual void startDocument();
208
225 virtual void startElement
226 (
227 const XMLCh* const uri,
228 const XMLCh* const localname,
229 const XMLCh* const qname
230 , const Attributes& attrs
231 );
232
246 virtual void startPrefixMapping
247 (
248 const XMLCh* const prefix,
249 const XMLCh* const uri
250 ) ;
251
264 virtual void endPrefixMapping
265 (
266 const XMLCh* const prefix
267 ) ;
268
286 virtual void skippedEntity
287 (
288 const XMLCh* const name
289 ) ;
290
292
317 virtual InputSource* resolveEntity
318 (
319 const XMLCh* const publicId
320 , const XMLCh* const systemId
321 );
322
324
341 virtual void error(const SAXParseException& exc);
342
360 virtual void fatalError(const SAXParseException& exc);
361
376 virtual void warning(const SAXParseException& exc);
377
383 virtual void resetErrors();
384
386
387
390
404 virtual void notationDecl
405 (
406 const XMLCh* const name
407 , const XMLCh* const publicId
408 , const XMLCh* const systemId
409 );
410
416 virtual void resetDocType();
417
432 virtual void unparsedEntityDecl
433 (
434 const XMLCh* const name
435 , const XMLCh* const publicId
436 , const XMLCh* const systemId
437 , const XMLCh* const notationName
438 );
440
441
459 virtual void comment
460 (
461 const XMLCh* const chars
462 , const XMLSize_t length
463 );
464
474 virtual void endCDATA ();
475
485 virtual void endDTD ();
486
497 virtual void endEntity (const XMLCh* const name);
498
508 virtual void startCDATA ();
509
522 virtual void startDTD
523 (
524 const XMLCh* const name
525 , const XMLCh* const publicId
526 , const XMLCh* const systemId
527 );
528
539 virtual void startEntity (const XMLCh* const name);
540
542
546
563 virtual void elementDecl
564 (
565 const XMLCh* const name
566 , const XMLCh* const model
567 );
568
583 virtual void attributeDecl
584 (
585 const XMLCh* const eName
586 , const XMLCh* const aName
587 , const XMLCh* const type
588 , const XMLCh* const mode
589 , const XMLCh* const value
590 );
591
604 virtual void internalEntityDecl
605 (
606 const XMLCh* const name
607 , const XMLCh* const value
608 );
609
622 virtual void externalEntityDecl
623 (
624 const XMLCh* const name
625 , const XMLCh* const publicId
626 , const XMLCh* const systemId
627 );
628
630
631 DefaultHandler() {};
632 virtual ~DefaultHandler() {};
633
634 private:
635 // -----------------------------------------------------------------------
636 // Unimplemented constructors and operators
637 // -----------------------------------------------------------------------
638 DefaultHandler(const DefaultHandler&);
639 DefaultHandler& operator=(const DefaultHandler&);
640 };
641
642
643 // ---------------------------------------------------------------------------
644 // HandlerBase: Inline default implementations
645 // ---------------------------------------------------------------------------
646 inline void DefaultHandler::characters(const XMLCh* const
647 ,const XMLSize_t)
648 {
649 }
650
651 inline void DefaultHandler::endDocument()
652 {
653 }
654
655 inline void DefaultHandler::endElement(const XMLCh* const
656 , const XMLCh* const
657 , const XMLCh* const)
658 {
659 }
660
661 inline void DefaultHandler::error(const SAXParseException&)
662 {
663 }
664
665 inline void DefaultHandler::fatalError(const SAXParseException& exc)
666 {
667 throw exc;
668 }
669
670 inline void
671 DefaultHandler::ignorableWhitespace( const XMLCh* const
672 , const XMLSize_t)
673 {
674 }
675
676 inline void DefaultHandler::notationDecl( const XMLCh* const
677 , const XMLCh* const
678 , const XMLCh* const)
679 {
680 }
681
682 inline void
683 DefaultHandler::processingInstruction( const XMLCh* const
684 , const XMLCh* const)
685 {
686 }
687
688 inline void DefaultHandler::resetErrors()
689 {
690 }
691
692 inline void DefaultHandler::resetDocument()
693 {
694 }
695
696 inline void DefaultHandler::resetDocType()
697 {
698 }
699
700 inline InputSource*
701 DefaultHandler::resolveEntity( const XMLCh* const
702 , const XMLCh* const)
703 {
704 return 0;
705 }
706
707 inline void
708 DefaultHandler::unparsedEntityDecl(const XMLCh* const
709 , const XMLCh* const
710 , const XMLCh* const
711 , const XMLCh* const)
712 {
713 }
714
715 inline void DefaultHandler::setDocumentLocator(const Locator* const)
716 {
717 }
718
719 inline void DefaultHandler::startDocument()
720 {
721 }
722
723 inline void
724 DefaultHandler::startElement( const XMLCh* const
725 , const XMLCh* const
726 , const XMLCh* const
727 , const Attributes&
728 )
729 {
730 }
731
732 inline void DefaultHandler::warning(const SAXParseException&)
733 {
734 }
735
736 inline void DefaultHandler::startPrefixMapping ( const XMLCh* const
737 ,const XMLCh* const)
738 {
739 }
740
741 inline void DefaultHandler::endPrefixMapping ( const XMLCh* const)
742 {
743 }
744
745 inline void DefaultHandler::skippedEntity ( const XMLCh* const)
746 {
747 }
748
749 inline void DefaultHandler::comment( const XMLCh* const
750 , const XMLSize_t)
751 {
752 }
753
754 inline void DefaultHandler::endCDATA ()
755 {
756 }
757
758 inline void DefaultHandler::endDTD ()
759 {
760 }
761
762 inline void DefaultHandler::endEntity (const XMLCh* const)
763 {
764 }
765
766 inline void DefaultHandler::startCDATA ()
767 {
768 }
769
770 inline void DefaultHandler::startDTD( const XMLCh* const
771 , const XMLCh* const
772 , const XMLCh* const)
773 {
774 }
775
776 inline void DefaultHandler::startEntity (const XMLCh* const)
777 {
778 }
779
780 inline void DefaultHandler::attributeDecl(const XMLCh* const,
781 const XMLCh* const,
782 const XMLCh* const,
783 const XMLCh* const,
784 const XMLCh* const)
785 {
786 }
787
788 inline void DefaultHandler::elementDecl(const XMLCh* const,
789 const XMLCh* const)
790 {
791 }
792
793 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
794 const XMLCh* const,
795 const XMLCh* const)
796 {
797 }
798
799 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
800 const XMLCh* const)
801 {
802 }
803
804 XERCES_CPP_NAMESPACE_END
805
806 #endif // ! DEFAULTHANDLER_HPP