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

XMLReader.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    XMLReader.h
00006  *
00007  *  $Id: XMLReader.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_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    * Return the current content handler.
00047    */
00048   virtual ACEXML_ContentHandler *getContentHandler (void) const = 0;
00049 
00050   /**
00051    * Return the current DTD handler.
00052    */
00053   virtual ACEXML_DTDHandler *getDTDHandler (void) const = 0;
00054 
00055   /**
00056    * Return the current entity resolver.
00057    */
00058   virtual ACEXML_EntityResolver *getEntityResolver (void) const = 0;
00059 
00060   /**
00061    * Return the current error handler.
00062    */
00063   virtual ACEXML_ErrorHandler *getErrorHandler (void) const = 0;
00064 
00065   /**
00066    * Look up the value of a feature.  This method allows
00067    * programmers to check whether a specific feature has been
00068    * activated in the parser.
00069    */
00070   virtual int getFeature (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00071           ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException,
00072                            ACEXML_SAXNotSupportedException)) = 0;
00073 
00074   /**
00075    * Look up the value of a property.
00076    */
00077   virtual void * getProperty (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00078     ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException,
00079                      ACEXML_SAXNotSupportedException)) = 0;
00080 
00081   /**
00082    * Parse an XML document.
00083    */
00084   virtual void parse (ACEXML_InputSource *input ACEXML_ENV_ARG_DECL)
00085     ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00086 
00087   /**
00088    * Parse an XML document from a system identifier (URI).
00089    */
00090   virtual void parse (const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00091         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00092 
00093   /**
00094    * Allow an application to register a content event handler.
00095    */
00096   virtual void setContentHandler (ACEXML_ContentHandler *handler) = 0;
00097 
00098   /**
00099    * Allow an application to register a DTD event handler.
00100    */
00101   virtual void setDTDHandler (ACEXML_DTDHandler *handler) = 0;
00102 
00103   /**
00104    * Allow an application to register an entity resolver.
00105    */
00106   virtual void setEntityResolver (ACEXML_EntityResolver *resolver) = 0;
00107 
00108   /**
00109    * Allow an application to register an error event handler.
00110    */
00111   virtual void setErrorHandler (ACEXML_ErrorHandler *handler) = 0;
00112 
00113   /**
00114    * Activating or deactivating a feature.
00115    */
00116   virtual void setFeature (const ACEXML_Char *name,
00117                            int boolean_value ACEXML_ENV_ARG_DECL)
00118     ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException,
00119                      ACEXML_SAXNotSupportedException)) = 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     ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException,
00127                      ACEXML_SAXNotSupportedException)) = 0;
00128 };
00129 
00130 
00131 #include "ace/post.h"
00132 
00133 #endif /* _ACEXML_XMLREADER_H_ */

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