ContentHandler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ContentHandler.h
00006  *
00007  *  $Id: ContentHandler.h 78907 2007-07-16 10:22:58Z sowayaa $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 #ifndef _ACEXML_CONTENTHANDLER_H_
00013 #define _ACEXML_CONTENTHANDLER_H_
00014 
00015 #include /**/ "ace/pre.h"
00016 #include "ACEXML/common/ACEXML_Export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "ACEXML/common/Env.h"
00023 #include "ACEXML/common/SAXExceptions.h"
00024 #include "ACEXML/common/Locator.h"
00025 #include "ACEXML/common/Attributes.h"
00026 
00027 /**
00028  * @class ACEXML_ContentHandler ContentHandler.h "ACEXML/common/ContentHandler.h"
00029  *
00030  * @brief ACEXML_ContentHandler
00031  *
00032  * This is the main interface that most SAX applications implement: if the
00033  * application needs to be informed of basic parsing events, it implements
00034  * this interface and registers an instance with the SAX parser using the
00035  * setContentHandler method. The parser uses the instance to report basic
00036  * document-related events like the start and end of elements and character
00037  * data.
00038  *
00039  * The order of events in this interface is very important, and mirrors the
00040  * order of information in the document itself. For example, all of an
00041  * element's content (character data, processing instructions, and/or
00042  * subelements) will appear, in order, between the startElement event and
00043  * the corresponding endElement event.
00044  */
00045 class ACEXML_Export ACEXML_ContentHandler
00046 {
00047 public:
00048 
00049   virtual ~ACEXML_ContentHandler (void);
00050 
00051   /**
00052    * Receive notification of character data.
00053    */
00054   virtual void characters (const ACEXML_Char *ch,
00055                            size_t start,
00056                            size_t length
00057                            ACEXML_ENV_ARG_DECL)
00058         = 0;
00059 
00060   /**
00061    * Receive notification of the end of a document.
00062    */
00063   virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00064         = 0;
00065 
00066   /**
00067    * Receive notification of the end of an element.
00068    */
00069   virtual void endElement (const ACEXML_Char *namespaceURI,
00070                            const ACEXML_Char *localName,
00071                            const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00072         = 0;
00073 
00074   /**
00075    * End the scope of a prefix-URI mapping.
00076    */
00077   virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
00078         = 0;
00079 
00080   /**
00081    * Receive notification of ignorable whitespace in element content.
00082    */
00083   virtual void ignorableWhitespace (const ACEXML_Char *ch,
00084                                     int start,
00085                                     int length ACEXML_ENV_ARG_DECL)
00086         = 0;
00087 
00088   /**
00089    * Receive notification of a processing instruction.
00090    */
00091   virtual void processingInstruction (const ACEXML_Char *target,
00092                                       const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
00093         = 0;
00094 
00095   /**
00096    * Receive an object for locating the origin of SAX document events.
00097    */
00098   virtual void setDocumentLocator (ACEXML_Locator *locator) = 0;
00099 
00100   /**
00101    * Receive notification of a skipped entity.
00102    */
00103   virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00104         = 0;
00105 
00106   /**
00107    * Receive notification of the beginning of a document.
00108    */
00109   virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00110         = 0;
00111 
00112   /**
00113    * Receive notification of the beginning of an element.
00114    */
00115   virtual void startElement (const ACEXML_Char *namespaceURI,
00116                              const ACEXML_Char *localName,
00117                              const ACEXML_Char *qName,
00118                              ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
00119         = 0;
00120 
00121   /**
00122    * Begin the scope of a prefix-URI Namespace mapping.
00123    */
00124   virtual void startPrefixMapping (const ACEXML_Char *prefix,
00125                                    const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
00126         = 0;
00127 };
00128 
00129 #include /**/ "ace/post.h"
00130 
00131 
00132 #endif /* _ACEXML_CONTENTHANDLER_H_ */

Generated on Sun Jan 27 13:04:14 2008 for ACEXML by doxygen 1.3.6