Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be / be_factory.cpp
blobd15c489320dbd5088420ef97b89a95384d75dd82
2 //=============================================================================
3 /**
4 * @file be_factory.cpp
6 * Extension of class AST_Factory that provides additional means for C++
7 * mapping.
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Boris Kolpackov <bosk@ipmce.ru>
12 //=============================================================================
14 #include "be_factory.h"
15 #include "be_visitor.h"
17 #include "ast_exception.h"
18 #include "ast_argument.h"
20 #include "utl_err.h"
21 #include "utl_exceptlist.h"
23 #include "global_extern.h"
25 be_factory::be_factory (UTL_ScopedName *n)
26 : COMMON_Base (1,
27 0), //@@ Always local, never abstract
28 AST_Decl (AST_Decl::NT_factory,
29 n),
30 UTL_Scope (AST_Decl::NT_factory),
31 AST_Factory (n),
32 be_scope (AST_Decl::NT_factory),
33 be_decl (AST_Decl::NT_factory,
38 be_factory::~be_factory (void)
42 void
43 be_factory::destroy (void)
45 // Call the destroy methods of our base classes.
46 this->be_scope::destroy ();
47 this->be_decl::destroy ();
49 this->AST_Factory::destroy ();
52 int
53 be_factory::accept (be_visitor *visitor)
55 return visitor->visit_factory (this);
58 AST_Argument *
59 be_factory::be_add_argument (AST_Argument *arg)
61 this->add_to_scope (arg);
62 this->add_to_referenced (arg,
64 0);
65 return arg;
68 IMPL_NARROW_FROM_DECL (be_factory)
69 IMPL_NARROW_FROM_SCOPE (be_factory)