summaryrefslogtreecommitdiff
path: root/modules/TAO/TAO_IDL/include/ast_visitor_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/TAO/TAO_IDL/include/ast_visitor_context.h')
-rw-r--r--modules/TAO/TAO_IDL/include/ast_visitor_context.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/TAO/TAO_IDL/include/ast_visitor_context.h b/modules/TAO/TAO_IDL/include/ast_visitor_context.h
new file mode 100644
index 00000000000..8b1b995f32f
--- /dev/null
+++ b/modules/TAO/TAO_IDL/include/ast_visitor_context.h
@@ -0,0 +1,54 @@
+//
+// $Id$
+//
+
+/* -*- C++ -*- */
+// ============================================================================
+//
+// = LIBRARY
+// TAO_IDL_FE
+//
+// = FILENAME
+// ast_visitor_context.h
+//
+// = DESCRIPTION
+// This class serves to provide the necessary context information to the
+// visitor as it generates code. This may include the scope inside which the
+// code is generated, the output file that is being used, and others. This
+// context information will be passed to the abstract/concrete visitor
+// factory which in turn will use it to construct the right visitor.
+//
+// = AUTHOR
+// Jeff Parsons & Aniruddha Gokhale
+//
+// ============================================================================
+
+#ifndef AST_VISITOR_CONTEXT_H
+#define AST_VISITOR_CONTEXT_H
+
+#include "fe_utils.h"
+
+class TAO_IDL_FE_Export ast_visitor_context
+{
+public:
+ ast_visitor_context (void);
+
+ ast_visitor_context (const ast_visitor_context &ctx);
+
+ ~ast_visitor_context (void);
+
+ // Accessors/mutators for template-related storage.
+
+ FE_Utils::T_PARAMLIST_INFO *template_params (void) const;
+ void template_params (FE_Utils::T_PARAMLIST_INFO *args);
+
+ FE_Utils::T_ARGLIST *template_args (void) const;
+ void template_args (FE_Utils::T_ARGLIST *args);
+
+protected:
+ // Storage for the current template module params and args.
+ FE_Utils::T_PARAMLIST_INFO *template_params_;
+ FE_Utils::T_ARGLIST *template_args_;
+};
+
+#endif /* AST_VISITOR_CONTEXT_H */