2 //=============================================================================
4 * @file be_operation.cpp
6 * Extension of class AST_Operation that provides additional means for C++
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
14 #include "be_operation.h"
15 #include "be_predefined_type.h"
16 #include "be_argument.h"
17 #include "be_visitor.h"
20 #include "ast_exception.h"
23 #include "utl_exceptlist.h"
25 #include "global_extern.h"
27 be_operation::be_operation (AST_Type
*rt
,
28 AST_Operation::Flags fl
,
34 AST_Decl (AST_Decl::NT_op
,
36 UTL_Scope (AST_Decl::NT_op
),
42 be_scope (AST_Decl::NT_op
),
43 be_decl (AST_Decl::NT_op
,
45 is_sendc_ami_ (false),
46 is_excep_ami_ (false),
49 if (this->imported ())
54 idl_global
->operation_seen_
= true;
56 if (!this->is_local ())
58 be_type
*bt
= dynamic_cast<be_type
*> (rt
);
59 bt
->seen_in_operation (true);
60 be_util::set_arg_seen_bit (bt
);
61 idl_global
->non_local_op_seen_
= true;
65 be_operation::~be_operation (void)
70 be_operation::destroy (void)
72 // Call the destroy methods of our base classes.
73 this->be_scope::destroy ();
74 this->be_decl::destroy ();
75 this->AST_Operation::destroy ();
79 be_operation::accept (be_visitor
*visitor
)
81 return visitor
->visit_operation (this);
85 be_operation::be_add_argument (AST_Argument
*arg
)
87 this->add_to_scope (arg
);
88 this->add_to_referenced (arg
,
95 be_operation::be_insert_exception (AST_Exception
*ex
)
97 UTL_ExceptList
*new_list
= 0;
98 ACE_NEW_RETURN (new_list
,
100 this->pd_exceptions
),
102 this->pd_exceptions
= new_list
;
107 be_operation::is_sendc_ami (void) const
109 return this->is_sendc_ami_
;
113 be_operation::is_sendc_ami (bool val
)
115 this->is_sendc_ami_
= val
;
119 be_operation::is_excep_ami (void) const
121 return this->is_excep_ami_
;
125 be_operation::is_excep_ami (bool val
)
127 this->is_excep_ami_
= val
;
131 be_operation::is_attr_op (void) const
133 return this->is_attr_op_
;
137 be_operation::is_attr_op (bool val
)
139 this->is_attr_op_
= val
;
142 IMPL_NARROW_FROM_DECL (be_operation
)
143 IMPL_NARROW_FROM_SCOPE (be_operation
)