summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp187
1 files changed, 108 insertions, 79 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp
index a119d621f85..78c2937678b 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_info_rettype.cpp
@@ -19,40 +19,40 @@
//
// ============================================================================
-#include "idl.h"
-#include "idl_extern.h"
-#include "be.h"
-
-#include "be_visitor_operation.h"
-
-ACE_RCSID(be_visitor_operation, interceptors_info_rettype, "$Id$")
-
+ACE_RCSID (be_visitor_operation,
+ interceptors_info_rettype,
+ "$Id$")
// ****************************************************************************
// Operation visitor for return types. This generates the mapping for a return
// type in an operation signature
// ****************************************************************************
-be_visitor_operation_interceptors_info_rettype::be_visitor_operation_interceptors_info_rettype (be_visitor_context
- *ctx)
+be_visitor_operation_interceptors_info_rettype::
+be_visitor_operation_interceptors_info_rettype (be_visitor_context *ctx)
: be_visitor_decl (ctx)
{
}
-be_visitor_operation_interceptors_info_rettype::~be_visitor_operation_interceptors_info_rettype (void)
+be_visitor_operation_interceptors_info_rettype::
+~be_visitor_operation_interceptors_info_rettype (void)
{
}
int
be_visitor_operation_interceptors_info_rettype::visit_array (be_array *node)
{
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << "_slice *";
@@ -62,14 +62,17 @@ be_visitor_operation_interceptors_info_rettype::visit_array (be_array *node)
int
be_visitor_operation_interceptors_info_rettype::visit_enum (be_enum *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name ();
@@ -79,14 +82,17 @@ be_visitor_operation_interceptors_info_rettype::visit_enum (be_enum *node)
int
be_visitor_operation_interceptors_info_rettype::visit_interface (be_interface *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << "_ptr";
@@ -96,14 +102,17 @@ be_visitor_operation_interceptors_info_rettype::visit_interface (be_interface *n
int
be_visitor_operation_interceptors_info_rettype::visit_interface_fwd (be_interface_fwd *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << "_ptr";
@@ -113,14 +122,17 @@ be_visitor_operation_interceptors_info_rettype::visit_interface_fwd (be_interfac
int
be_visitor_operation_interceptors_info_rettype::visit_native (be_native *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name ();
@@ -130,14 +142,17 @@ be_visitor_operation_interceptors_info_rettype::visit_native (be_native *node)
int
be_visitor_operation_interceptors_info_rettype::visit_predefined_type (be_predefined_type *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
switch (node->pt ())
{
@@ -164,16 +179,19 @@ be_visitor_operation_interceptors_info_rettype::visit_predefined_type (be_predef
int
be_visitor_operation_interceptors_info_rettype::visit_sequence (be_sequence *node)
{
-
- // we should never directly be here because anonymous sequence return types
+ // We should never directly be here because anonymous sequence return types
// are not allowed
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << " *";
@@ -183,8 +201,7 @@ be_visitor_operation_interceptors_info_rettype::visit_sequence (be_sequence *nod
int
be_visitor_operation_interceptors_info_rettype::visit_string (be_string *node)
{
-
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
+ TAO_OutStream *os = this->ctx_->stream ();
if (node->width () == (long) sizeof (char))
{
@@ -201,14 +218,17 @@ be_visitor_operation_interceptors_info_rettype::visit_string (be_string *node)
int
be_visitor_operation_interceptors_info_rettype::visit_structure (be_structure *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name ();
@@ -244,14 +264,17 @@ be_visitor_operation_interceptors_info_rettype::visit_typedef (be_typedef *node)
int
be_visitor_operation_interceptors_info_rettype::visit_union (be_union *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name ();
@@ -268,14 +291,17 @@ be_visitor_operation_interceptors_info_rettype::visit_union (be_union *node)
int
be_visitor_operation_interceptors_info_rettype::visit_valuetype (be_valuetype *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << " *";
@@ -285,14 +311,17 @@ be_visitor_operation_interceptors_info_rettype::visit_valuetype (be_valuetype *n
int
be_visitor_operation_interceptors_info_rettype::visit_valuetype_fwd (be_valuetype_fwd *node)
{
+ TAO_OutStream *os = this->ctx_->stream ();
+ be_type *bt;
- TAO_OutStream *os = this->ctx_->stream (); // grab the out stream
- be_type *bt; // return type
-
- if (this->ctx_->alias ()) // a typedefed return type
- bt = this->ctx_->alias ();
+ if (this->ctx_->alias ())
+ {
+ bt = this->ctx_->alias ();
+ }
else
- bt = node;
+ {
+ bt = node;
+ }
*os << bt->name () << " *";