2 //=============================================================================
4 * @file be_argument.cpp
6 * Extension of class AST_Argument that provides additional means for C++
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
14 #include "be_argument.h"
16 #include "be_visitor.h"
19 #include "nr_extern.h"
20 #include "global_extern.h"
22 be_argument::be_argument (AST_Argument::Direction d
,
26 AST_Decl (AST_Decl::NT_argument
,
28 AST_Field (AST_Decl::NT_argument
,
34 be_decl (AST_Decl::NT_argument
,
37 AST_Decl
*dcl
= ScopeAsDecl (this->defined_in ());
39 // If there have been previous errors, dcl may be 0,
40 // and we don't want to crash, so we check for non-zero.
41 // Also, we don't want to set the bit if the operation is
42 // declared in an included file UNLESS the enclosing
43 // interface is abstract, in which case we regenerate the
47 && (idl_global
->in_main_file () || dcl
->is_abstract ()))
49 be_type
*bt
= dynamic_cast<be_type
*> (ft
);
50 bt
->seen_in_operation (true);
51 be_util::set_arg_seen_bit (bt
);
52 idl_global
->need_skeleton_includes_
= true;
58 be_argument::accept (be_visitor
*visitor
)
60 return visitor
->visit_argument (this);
64 be_argument::destroy (void)
66 this->be_decl::destroy ();
67 this->AST_Argument::destroy ();
70 IMPL_NARROW_FROM_DECL (be_argument
)