XMLReader.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    XMLReader.h
00006  *
00007  *  $Id: XMLReader.h 78907 2007-07-16 10:22:58Z sowayaa $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 #ifndef _ACEXML_XMLREADER_H_
00013 #define _ACEXML_XMLREADER_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/ContentHandler.h"
00023 #include "ACEXML/common/DTDHandler.h"
00024 #include "ACEXML/common/EntityResolver.h"
00025 #include "ACEXML/common/ErrorHandler.h"
00026 
00027 /**
00028  * @class ACEXML_XMLReader XMLReader.h "ACEXML/common/XMLReader.h"
00029  *
00030  * @brief ACEXML_XMLReader
00031  *
00032  * XMLReader is the interface that an XML parser's SAX2 driver must
00033  * implement. This interface allows an application to set and query
00034  * features and properties in the parser, to register event handlers
00035  * for document processing, and to initiate a document parse.
00036  *
00037  * All SAX interfaces are assumed to be synchronous: the parse methods
00038  * must not return until parsing is complete, and readers must wait
00039  * for an event-handler callback to return before reporting the next
00040  * event.
00041  */
00042 class ACEXML_Export ACEXML_XMLReader
00043 {
00044 public:
00045 
00046   virtual ~ACEXML_XMLReader (void);
00047 
00048   /**
00049    * Return the current content handler.
00050    */
00051   virtual ACEXML_ContentHandler *getContentHandler (void) const = 0;
00052 
00053   /**
00054    * Return the current DTD handler.
00055    */
00056   virtual ACEXML_DTDHandler *getDTDHandler (void) const = 0;
00057 
00058   /**
00059    * Return the current entity resolver.
00060    */
00061   virtual ACEXML_EntityResolver *getEntityResolver (void) const = 0;
00062 
00063   /**
00064    * Return the current error handler.
00065    */
00066   virtual ACEXML_ErrorHandler *getErrorHandler (void) const = 0;
00067 
00068   /**
00069    * Look up the value of a feature.  This method allows
00070    * programmers to check whether a specific feature has been
00071    * activated in the parser.
00072    */
00073   virtual int getFeature (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00074           = 0;
00075 
00076   /**
00077    * Look up the value of a property.
00078    */
00079   virtual void * getProperty (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00080     = 0;
00081 
00082   /**
00083    * Parse an XML document.
00084    */
00085   virtual void parse (ACEXML_InputSource *input ACEXML_ENV_ARG_DECL)
00086     = 0;
00087 
00088   /**
00089    * Parse an XML document from a system identifier (URI).
00090    */
00091   virtual void parse (const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00092         = 0;
00093 
00094   /**
00095    * Allow an application to register a content event handler.
00096    */
00097   virtual void setContentHandler (ACEXML_ContentHandler *handler) = 0;
00098 
00099   /**
00100    * Allow an application to register a DTD event handler.
00101    */
00102   virtual void setDTDHandler (ACEXML_DTDHandler *handler) = 0;
00103 
00104   /**
00105    * Allow an application to register an entity resolver.
00106    */
00107   virtual void setEntityResolver (ACEXML_EntityResolver *resolver) = 0;
00108 
00109   /**
00110    * Allow an application to register an error event handler.
00111    */
00112   virtual void setErrorHandler (ACEXML_ErrorHandler *handler) = 0;
00113 
00114   /**
00115    * Activating or deactivating a feature.
00116    */
00117   virtual void setFeature (const ACEXML_Char *name,
00118                            int boolean_value ACEXML_ENV_ARG_DECL)
00119     = 0;
00120 
00121   /**
00122    * Set the value of a property.
00123    */
00124   virtual void setProperty (const ACEXML_Char *name,
00125                             void *value ACEXML_ENV_ARG_DECL)
00126     = 0;
00127 };
00128 
00129 
00130 #include /**/ "ace/post.h"
00131 
00132 #endif /* _ACEXML_XMLREADER_H_ */

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