diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-14 05:47:01 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-14 05:47:01 +0000 |
commit | 1bda2ed944f06e6ef20d483549409070b9bae505 (patch) | |
tree | 4b5602aeaad1dab3e6b4db752f91311a9d8ad619 /TAO/TAO_IDL/be/be_visitor_scope.cpp | |
parent | ea56952b7880274cd4d3a4b84e39794b0521942c (diff) | |
download | ATCD-ACE-4_4_40.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE-4_4_40'.ACE-4_4_40
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_scope.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_scope.cpp | 89 |
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; -} |