ContentHandler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ContentHandler.h
00006  *
00007  *  ContentHandler.h,v 1.8 2005/04/20 16:22:53 ossama Exp
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                            int start,
00056                            int length ACEXML_ENV_ARG_DECL)
00057         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00058 
00059   /**
00060    * Receive notification of the end of a document.
00061    */
00062   virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00063         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00064 
00065   /**
00066    * Receive notification of the end of an element.
00067    */
00068   virtual void endElement (const ACEXML_Char *namespaceURI,
00069                            const ACEXML_Char *localName,
00070                            const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00071         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00072 
00073   /**
00074    * End the scope of a prefix-URI mapping.
00075    */
00076   virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
00077         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00078 
00079   /**
00080    * Receive notification of ignorable whitespace in element content.
00081    */
00082   virtual void ignorableWhitespace (const ACEXML_Char *ch,
00083                                     int start,
00084                                     int length ACEXML_ENV_ARG_DECL)
00085         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00086 
00087   /**
00088    * Receive notification of a processing instruction.
00089    */
00090   virtual void processingInstruction (const ACEXML_Char *target,
00091                                       const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
00092         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00093 
00094   /**
00095    * Receive an object for locating the origin of SAX document events.
00096    */
00097   virtual void setDocumentLocator (ACEXML_Locator *locator) = 0;
00098 
00099   /**
00100    * Receive notification of a skipped entity.
00101    */
00102   virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00103         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00104 
00105   /**
00106    * Receive notification of the beginning of a document.
00107    */
00108   virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00109         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00110 
00111   /**
00112    * Receive notification of the beginning of an element.
00113    */
00114   virtual void startElement (const ACEXML_Char *namespaceURI,
00115                              const ACEXML_Char *localName,
00116                              const ACEXML_Char *qName,
00117                              ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
00118         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00119 
00120   /**
00121    * Begin the scope of a prefix-URI Namespace mapping.
00122    */
00123   virtual void startPrefixMapping (const ACEXML_Char *prefix,
00124                                    const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
00125         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00126 };
00127 
00128 #include /**/ "ace/post.h"
00129 
00130 
00131 #endif /* _ACEXML_CONTENTHANDLER_H_ */

Generated on Thu Nov 9 11:45:35 2006 for ACEXML by doxygen 1.3.6