diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-01 14:39:46 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-01 14:39:46 +0000 |
commit | 23e2c6ede250f949aaf65100ea31d3d5a910201b (patch) | |
tree | 205ba7bea938b82dc3c82e706771ff6906f2fc9b | |
parent | 6377161bba15d4bca0d83198427409836d8651d3 (diff) | |
download | ATCD-23e2c6ede250f949aaf65100ea31d3d5a910201b.tar.gz |
ChangeLogTag: Wed Aug 1 09:36:37 2001 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp | 46 |
1 files changed, 42 insertions, 4 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 3c68b3cb42c..427a82ae314 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp @@ -137,6 +137,36 @@ be_visitor_operation_cs::visit_operation (be_operation *node) *os << be_nl << be_nl; } + AST_Type *rt = 0; + be_type *brt = 0; + AST_Decl::NodeType bnt; + be_predefined_type *bpt = 0; + AST_PredefinedType::PredefinedType pdt; + + if (!this->void_return_type (bt)) + { + rt = node->return_type (); + brt = be_type::narrow_from_decl (rt); + bnt = brt->base_node_type (); + + if (bnt == AST_Decl::NT_pre_defined) + { + bpt = be_predefined_type::narrow_from_decl (brt); + pdt = bpt->pt (); + + if (pdt == AST_PredefinedType::PT_longlong) + { + *os << "CORBA::LongLong _tao_retval = " + << "ACE_CDR_LONGLONG_INITIALIZER;" << be_nl << be_nl; + } + else if (pdt == AST_PredefinedType::PT_longdouble) + { + *os << "CORBA::LongDouble _tao_retval = " + << "ACE_CDR_LONG_DOUBLE_INITIALIZER;" << be_nl << be_nl; + } + } + } + // Generate code that retrieves the proper proxy implementation // using the proxy broker available, and perform the call // using the proxy implementation provided by the broker. @@ -149,10 +179,6 @@ be_visitor_operation_cs::visit_operation (be_operation *node) { *os << "ACE_CHECK_RETURN ("; - AST_Type *rt = node->return_type (); - bt = be_type::narrow_from_decl (rt); - AST_Decl::NodeType bnt = bt->base_node_type (); - if (bnt == AST_Decl::NT_enum) { // The enum is a unique type, so we must cast. @@ -174,6 +200,18 @@ be_visitor_operation_cs::visit_operation (be_operation *node) *os << "0);"; } } + else if (bnt == AST_Decl::NT_pre_defined) + { + if (pdt == AST_PredefinedType::PT_longlong + || pdt == AST_PredefinedType::PT_longdouble) + { + *os << "_tao_retval);"; + } + else + { + *os << "0);"; + } + } else { *os << "0);"; |