summaryrefslogtreecommitdiff
path: root/ACE/ACEXML/parser/parser/ParserContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ACEXML/parser/parser/ParserContext.h')
-rw-r--r--ACE/ACEXML/parser/parser/ParserContext.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/ACE/ACEXML/parser/parser/ParserContext.h b/ACE/ACEXML/parser/parser/ParserContext.h
new file mode 100644
index 00000000000..34b1edbba78
--- /dev/null
+++ b/ACE/ACEXML/parser/parser/ParserContext.h
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file ParserContext.h
+ *
+ * $Id$
+ *
+ * @author Krishnakumar B <kitty@cs.wustl.edu>
+ */
+//=============================================================================
+
+#ifndef ACEXML_PARSER_CONTEXT_H
+#define ACEXML_PARSER_CONTEXT_H
+
+#include /**/ "ace/pre.h"
+#include "ACEXML/parser/parser/Parser_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "ACEXML/common/XML_Types.h"
+#include "ACEXML/common/InputSource.h"
+#include "ACEXML/common/Locator.h"
+#include "ACEXML/common/LocatorImpl.h"
+#include "ace/Functor.h"
+#include "ace/Containers_T.h"
+
+class ACEXML_PARSER_Export ACEXML_Parser_Context
+{
+public:
+ /// Default constructor
+ ACEXML_Parser_Context();
+
+ /// Constructor which initializes the context
+ ACEXML_Parser_Context (ACEXML_InputSource* instream,
+ ACEXML_LocatorImpl* locator);
+
+ /// Comparison operator
+ bool operator!= (const ACEXML_Parser_Context& src);
+
+ /// Destructor
+ virtual ~ACEXML_Parser_Context();
+
+ /// Reset the parser context. This does not free up the memory. Only sets
+ /// it to zero. Meant to be called after a context is pushed on to a
+ /// stack.
+ void reset (void);
+
+ /// Get the underlying input source.
+ virtual ACEXML_InputSource* getInputSource(void);
+
+ /// Get the underlying locator.
+ virtual ACEXML_LocatorImpl* getLocator(void);
+
+ /// Set the underlying input source.
+ virtual void setInputSource(ACEXML_InputSource* ip);
+
+ /// Set the underlying locator.
+ virtual void setLocator(ACEXML_LocatorImpl* locator);
+
+private:
+
+ /// Copy constructor
+ ACEXML_Parser_Context (const ACEXML_Parser_Context& src);
+
+ /// Assignment operator
+ ACEXML_Parser_Context& operator= (const ACEXML_Parser_Context& src);
+
+ /// Current input char stream.
+ ACEXML_InputSource *instream_;
+
+ /// Current Locator which provides line no., column no. systemId and publicId
+ ACEXML_LocatorImpl* locator_;
+};
+
+#if defined (__ACEXML_INLINE__)
+# include "ACEXML/parser/parser/ParserContext.inl"
+#endif /* __ACEXML_INLINE__ */
+
+#include /**/ "ace/post.h"
+
+#endif /* ACEXML_PARSER_CONTEXT_H */