summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_scope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_scope.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_scope.cpp89
1 files changed, 0 insertions, 89 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp
deleted file mode 100644
index 126e18ca3e2..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_scope.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// $Id$
-//
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// be_visitor_scope.cpp
-//
-// = DESCRIPTION
-// Visitor for the base be_scope node. This serves to maintain the current
-// state (context) of code generation for the derived visitor.
-//
-// = AUTHOR
-// Aniruddha Gokhale
-//
-// ============================================================================
-
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_scope.h"
-
-// ******************************************************
-// Generic visitor for a scope.
-// All elements that give rise to a scope inherit from
-// this class
-// ******************************************************
-
-be_visitor_scope::be_visitor_scope (be_visitor_context *ctx)
- : be_visitor_decl (ctx)
-{
-}
-
-be_visitor_scope::~be_visitor_scope (void)
-{
-}
-
-// visit the scope and its elements
-int
-be_visitor_scope::visit_scope (be_scope *node)
-{
- // proceed if the number of members in our scope is greater than 0
- if (node->nmembers () > 0)
- {
- // initialize an iterator to iterate thru our scope
- UTL_ScopeActiveIterator *si;
- ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
- // continue until each element is visited
- while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- // set the scope node in which the code is being generated
- this->ctx_->scope (node->decl ());
- // set the node to be visited
- this->ctx_->node (bd);
- if (bd == 0 || bd->accept (this) == -1)
- {
- delete si;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_scope::visit_scope - "
- "codegen for scope failed\n"), -1);
-
- }
- si->next ();
- if (!si->is_done ())
- this->post_process (); // anything to be done after each element
- // except the last one is processed?
-
- } // end of while loop
- delete si;
- } // end of if
-
- return 0;
-}
-
-int
-be_visitor_scope::post_process (void)
-{
- return 0;
-}