ParserContext.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ParserContext.h
00006  *
00007  *  $Id: ParserContext.h 77257 2007-02-20 17:27:00Z johnnyw $
00008  *
00009  *  @author Krishnakumar B <kitty@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACEXML_PARSER_CONTEXT_H
00014 #define ACEXML_PARSER_CONTEXT_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "ACEXML/parser/parser/Parser_export.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "ACEXML/common/XML_Types.h"
00024 #include "ACEXML/common/InputSource.h"
00025 #include "ACEXML/common/Locator.h"
00026 #include "ACEXML/common/LocatorImpl.h"
00027 #include "ace/Functor.h"
00028 #include "ace/Containers_T.h"
00029 
00030 class ACEXML_PARSER_Export ACEXML_Parser_Context
00031 {
00032 public:
00033   /// Default constructor
00034   ACEXML_Parser_Context();
00035 
00036   /// Constructor which initializes the context
00037   ACEXML_Parser_Context (ACEXML_InputSource* instream,
00038                          ACEXML_LocatorImpl* locator);
00039 
00040   /// Comparison operator
00041   bool operator!= (const ACEXML_Parser_Context& src);
00042 
00043   /// Destructor
00044   virtual ~ACEXML_Parser_Context();
00045 
00046   /// Reset the parser context. This does not free up the memory. Only sets
00047   /// it to zero. Meant to be called after a context is pushed on to a
00048   /// stack.
00049   void reset (void);
00050 
00051   /// Get the underlying input source.
00052   virtual ACEXML_InputSource* getInputSource(void);
00053 
00054   /// Get the underlying locator.
00055   virtual ACEXML_LocatorImpl* getLocator(void);
00056 
00057   /// Set the underlying input source.
00058   virtual void setInputSource(ACEXML_InputSource* ip);
00059 
00060   /// Set the underlying locator.
00061   virtual void setLocator(ACEXML_LocatorImpl* locator);
00062 
00063 private:
00064 
00065   /// Copy constructor
00066   ACEXML_Parser_Context (const ACEXML_Parser_Context& src);
00067 
00068   /// Assignment operator
00069   ACEXML_Parser_Context& operator= (const ACEXML_Parser_Context& src);
00070 
00071   /// Current input char stream.
00072   ACEXML_InputSource *instream_;
00073 
00074   /// Current Locator which provides line no., column no. systemId and publicId
00075   ACEXML_LocatorImpl* locator_;
00076 };
00077 
00078 #if defined (__ACEXML_INLINE__)
00079 # include "ACEXML/parser/parser/ParserContext.inl"
00080 #endif /* __ACEXML_INLINE__ */
00081 
00082 #include /**/ "ace/post.h"
00083 
00084 #endif /* ACEXML_PARSER_CONTEXT_H */

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