summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-13 01:02:12 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-13 01:02:12 +0000
commit3d2e54b6d7d77db909836f711487aee66808d21e (patch)
tree8f0b72f3f5ed4499ae5ce04323f5092ed4fa46da
parent45771cab1a9a945ce867abb3d76a986c1194dcf2 (diff)
downloadATCD-3d2e54b6d7d77db909836f711487aee66808d21e.tar.gz
attribute probs resolved
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
index 3d3c9c093fe..545f771d67a 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
@@ -383,7 +383,33 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
*os << parent->full_name () << "::";
}
- *os << "TAO_ClientRequest_Info_"<< node->flat_name () << " ri (" << this->compute_operation_name (node) << ",\n"
+ *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<< " ri (" << this->compute_operation_name (node) << ",\n"
<< "_tao_call.service_info ()," << be_nl
<< "this";