summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-13 00:54:18 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-13 00:54:18 +0000
commit87c3c43551fd789614f3ea073ad44b4f434fc032 (patch)
treebf738fa78db9e17210ed2ae4b99a31557aeef428
parentc1860f20a15e928369251bef36f3997142c796b3 (diff)
downloadATCD-87c3c43551fd789614f3ea073ad44b4f434fc032.tar.gz
attribute chanegs
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/interceptors_ch.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_ch.cpp
index 6d7d8febbf1..e3397a95ef6 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_ch.cpp
@@ -87,7 +87,33 @@ be_visitor_operation_interceptors_ch::visit_operation (be_operation *node)
be_scope::narrow_from_scope (node->defined_in ())->decl ();
*os << parent->full_name () <<";"<< be_nl;
- *os << "TAO_ClientRequest_Info_"<< node->flat_name () << " (" << be_idt_nl
+ *os << "TAO_ClientRequest_Info_"<< node->flat_name ();
+ // We need the interface node in which this operation was defined. However,
+ // if this operation node was an attribute node in disguise, we get this
+ // information from the context and add a "_get"/"_set" to the flat
+ // name to get around the problem of overloaded methods which are
+ // generated for attributes.
+ if (this->ctx_->attribute ())
+ {
+ bt = be_type::narrow_from_decl (node->return_type ());
+ if (!bt)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interceptors_ch::"
+ "visit_operation - "
+ "Bad return type\n"),
+ -1);
+ }
+
+ // grab the right visitor to generate the return type if its not
+ // void it means it is not the accessor.
+ if (!this->void_return_type (bt))
+ *os <<"_get";
+ else
+ *os <<"_set";
+ }
+
+ *os << " (" << be_idt_nl
<< "const char * operation,"<< be_nl
<< "IOP::ServiceContextList &service_context_list," << be_nl
<< "CORBA::Object * target" << be_uidt;