Print_Handler.h

Go to the documentation of this file.
00001 // $Id: Print_Handler.h 78907 2007-07-16 10:22:58Z sowayaa $
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Print_Handler.h
00006  *
00007  *  $Id: Print_Handler.h 78907 2007-07-16 10:22:58Z sowayaa $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACEXML_PRINT_HANDLER_H
00014 #define ACEXML_PRINT_HANDLER_H
00015 
00016 #include "ACEXML/common/DefaultHandler.h"
00017 
00018 /**
00019  * @class ACEXML_Print_Handler
00020  *
00021  * @brief ACEXML_Print_Handler is an example SAX event handler.
00022  *
00023  * This SAX event handler prints out a detailed event report
00024  * on every event it receives.
00025  */
00026 class ACEXML_Print_Handler : public ACEXML_DefaultHandler
00027 {
00028 public:
00029   /*
00030    * Default constructor.
00031    */
00032   ACEXML_Print_Handler (ACEXML_Char* fileName);
00033 
00034   /*
00035    * Default destructor.
00036    */
00037   virtual ~ACEXML_Print_Handler (void);
00038 
00039   // Methods inherited from ACEXML_ContentHandler.
00040 
00041   /*
00042    * Receive notification of character data.
00043    */
00044   virtual void characters (const ACEXML_Char *ch,
00045                            size_t start,
00046                            size_t length ACEXML_ENV_ARG_DECL)
00047     ;
00048 
00049   /*
00050    * Receive notification of the end of a document.
00051    */
00052   virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00053     ;
00054 
00055   /*
00056    * Receive notification of the end of an element.
00057    */
00058   virtual void endElement (const ACEXML_Char *namespaceURI,
00059                            const ACEXML_Char *localName,
00060                            const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00061     ;
00062 
00063   /*
00064    * End the scope of a prefix-URI mapping.
00065    */
00066   virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
00067     ;
00068 
00069   /*
00070    * Receive notification of ignorable whitespace in element content.
00071    */
00072   virtual void ignorableWhitespace (const ACEXML_Char *ch,
00073                                     int start,
00074                                     int length ACEXML_ENV_ARG_DECL)
00075     ;
00076 
00077   /*
00078    * Receive notification of a processing instruction.
00079    */
00080   virtual void processingInstruction (const ACEXML_Char *target,
00081                                       const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
00082     ;
00083 
00084   /*
00085    * Receive an object for locating the origin of SAX document events.
00086    */
00087   virtual void setDocumentLocator (ACEXML_Locator *locator) ;
00088 
00089   /*
00090    * Receive notification of a skipped entity.
00091    */
00092   virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00093     ;
00094 
00095   /*
00096    * Receive notification of the beginning of a document.
00097    */
00098   virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00099     ;
00100 
00101   /*
00102    * Receive notification of the beginning of an element.
00103    */
00104   virtual void startElement (const ACEXML_Char *namespaceURI,
00105                              const ACEXML_Char *localName,
00106                              const ACEXML_Char *qName,
00107                              ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
00108     ;
00109 
00110   /*
00111    * Begin the scope of a prefix-URI Namespace mapping.
00112    */
00113   virtual void startPrefixMapping (const ACEXML_Char *prefix,
00114                                    const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
00115     ;
00116 
00117   // *** Methods inherit from ACEXML_DTDHandler.
00118 
00119   /*
00120    * Receive notification of a notation declaration event.
00121    */
00122   virtual void notationDecl (const ACEXML_Char *name,
00123                              const ACEXML_Char *publicId,
00124                              const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00125     ;
00126 
00127   /*
00128    * Receive notification of an unparsed entity declaration event.
00129    */
00130   virtual void unparsedEntityDecl (const ACEXML_Char *name,
00131                                    const ACEXML_Char *publicId,
00132                                    const ACEXML_Char *systemId,
00133                                    const ACEXML_Char *notationName ACEXML_ENV_ARG_DECL)
00134     ;
00135 
00136   // Methods inherit from ACEXML_EnitityResolver.
00137 
00138   /*
00139    * Allow the application to resolve external entities.
00140    */
00141   virtual ACEXML_InputSource *resolveEntity (const ACEXML_Char *publicId,
00142                                              const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00143     ;
00144 
00145   // Methods inherit from ACEXML_ErrorHandler.
00146 
00147   /*
00148    * Receive notification of a recoverable error.
00149    */
00150   virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00151     ;
00152 
00153   /*
00154    * Receive notification of a non-recoverable error.
00155    */
00156   virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00157     ;
00158 
00159   /*
00160    * Receive notification of a warning.
00161    */
00162   virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00163     ;
00164 private:
00165 
00166   ACEXML_Char* fileName_;
00167   ACEXML_Locator* locator_;
00168 
00169 };
00170 
00171 #endif /* ACEXML_PRINT_HANDLER_H */

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