summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_operation.cpp
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-26 09:23:29 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-26 09:23:29 +0000
commit9abe6ad1e1b6a54a011fa1285ea6ee9164ebe73c (patch)
tree71d95f6bb49eafb6ab5b4f5322c42565ad3601c6 /TAO/TAO_IDL/be/be_operation.cpp
parent65ee81f3ca23219090d3d363d092c4ad171718f2 (diff)
downloadATCD-9abe6ad1e1b6a54a011fa1285ea6ee9164ebe73c.tar.gz
ChangeLogTag: Sun Sep 26 04:20:00 1999 Michael Kircher <Michael.Kicher@mchp.siemens.de>
Diffstat (limited to 'TAO/TAO_IDL/be/be_operation.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_operation.cpp47
1 files changed, 45 insertions, 2 deletions
diff --git a/TAO/TAO_IDL/be/be_operation.cpp b/TAO/TAO_IDL/be/be_operation.cpp
index 89d1b325b6a..b9c385b75d6 100644
--- a/TAO/TAO_IDL/be/be_operation.cpp
+++ b/TAO/TAO_IDL/be/be_operation.cpp
@@ -30,7 +30,8 @@ ACE_RCSID(be, be_operation, "$Id$")
*/
be_operation::be_operation (void)
: argument_count_ (-1),
- has_native_ (0)
+ has_native_ (0),
+ strategy_ (new be_operation_default_strategy (this))
{
}
@@ -40,10 +41,20 @@ be_operation::be_operation (AST_Type *rt, AST_Operation::Flags fl,
AST_Decl (AST_Decl::NT_op, n, p),
UTL_Scope (AST_Decl::NT_op),
argument_count_ (-1),
- has_native_ (0)
+ has_native_ (0),
+ strategy_ (new be_operation_default_strategy (this))
{
}
+
+be_operation::~be_operation (void)
+{
+ // We know that it cannot be 0, but..
+ if (!this->strategy_)
+ delete this->strategy_;
+}
+
+
// compute total number of members
int
be_operation::compute_argument_attr (void)
@@ -172,6 +183,38 @@ be_operation::accept (be_visitor *visitor)
return visitor->visit_operation (this);
}
+be_operation_strategy *
+be_operation::set_strategy (be_operation_strategy *new_strategy)
+{
+ be_operation_strategy *old = this->strategy_;
+
+ if (new_strategy != 0)
+ this->strategy_ = new_strategy;
+
+ return old;
+}
+
+
+TAO_CodeGen::CG_STATE
+be_operation::next_state (TAO_CodeGen::CG_STATE current_state,
+ int is_extra_state)
+{
+ return this->strategy_->next_state (current_state, is_extra_state);
+}
+
+int
+be_operation::has_extra_code_generation (TAO_CodeGen::CG_STATE current_state)
+{
+ return this->strategy_->has_extra_code_generation (current_state);
+}
+
+be_operation*
+be_operation::hidden_operation ()
+{
+ return this->strategy_->hidden_operation ();
+}
+
+
// Narrowing
IMPL_NARROW_METHODS3 (be_operation, AST_Operation, be_scope, be_decl)
IMPL_NARROW_FROM_DECL (be_operation)