Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ContentHandler.h

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

Generated on Mon Jun 16 13:23:19 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002