summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-23 19:36:44 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-23 19:36:44 +0000
commit7178f6caa97b223d0b2ca5742cca7523b528a14c (patch)
tree559f7974391a508b3e497bdd05b7a7b6f8532a91
parentdb1a3127f7a25b6f718ceb1f470789023ea463d7 (diff)
downloadATCD-7178f6caa97b223d0b2ca5742cca7523b528a14c.tar.gz
(be_visitor_collocated_ss::visit_operation): removed unused local "nl"
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface.cpp171
1 files changed, 84 insertions, 87 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp
index c8161d704f8..87ff00c9a37 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp
@@ -1,6 +1,4 @@
-//
// $Id$
-//
#include "idl.h"
#include "global_extern.h"
@@ -35,13 +33,13 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node)
if (node->n_inherits () > 0)
{
for (int i = 0; i < node->n_inherits (); ++i)
- {
- *os << "," << nl;
- be_interface* parent =
- be_interface::narrow_from_decl (node->inherits()[i]);
- *os << " public virtual "
- << parent->relative_coll_name (node->full_coll_name ());
- }
+ {
+ *os << "," << nl;
+ be_interface* parent =
+ be_interface::narrow_from_decl (node->inherits()[i]);
+ *os << " public virtual "
+ << parent->relative_coll_name (node->full_coll_name ());
+ }
}
*os << "\n";
os->decr_indent ();
@@ -78,7 +76,7 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node)
}
*os << node->local_name ()
<< "_ptr _get_servant (void) const;" << be_nl;
-
+
*os << "virtual CORBA::Boolean _is_a (" << be_idt << be_idt_nl
<< "const char *logical_type_id," << be_nl
<< "CORBA::Environment &_tao_environment" << be_uidt_nl
@@ -88,24 +86,24 @@ int be_visitor_collocated_sh::visit_interface (be_interface *node)
{
UTL_ScopeActiveIterator *si;
ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
+ UTL_ScopeActiveIterator (node,
+ UTL_Scope::IK_decls),
+ -1);
while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- si->next ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- if (d->imported () || bd == 0)
- {
- continue;
- }
- if (bd->accept (this) == -1)
- {
- delete si;
- return -1;
- }
- }
+ {
+ AST_Decl *d = si->item ();
+ si->next ();
+ be_decl *bd = be_decl::narrow_from_decl (d);
+ if (d->imported () || bd == 0)
+ {
+ continue;
+ }
+ if (bd->accept (this) == -1)
+ {
+ delete si;
+ return -1;
+ }
+ }
delete si;
}
@@ -187,18 +185,18 @@ int be_visitor_collocated_sh::visit_attribute (be_attribute *node)
{
sh->indent ();
*sh << "virtual void " << node->local_name ()
- << " (" << be_idt << be_idt;
-
+ << " (" << be_idt << be_idt;
+
be_visitor_args_decl vdecl (sh);
vdecl.current_type_name (bt->name ());
vdecl.argument_direction (AST_Argument::dir_IN);
if (bt->accept (&vdecl) == -1)
- return -1;
+ return -1;
*sh << " _tao_value," << be_nl
- << "CORBA::Environment &_tao_environment" << be_uidt_nl
- << ");\n" << be_uidt;
+ << "CORBA::Environment &_tao_environment" << be_uidt_nl
+ << ");\n" << be_uidt;
}
return 0;
}
@@ -255,24 +253,24 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node)
if (this->current_interface_->n_inherits () > 0)
{
for (int i = 0; i < node->n_inherits (); ++i)
- {
- be_interface* parent =
- be_interface::narrow_from_decl (this->current_interface_->inherits()[i]);
+ {
+ be_interface* parent =
+ be_interface::narrow_from_decl (this->current_interface_->inherits()[i]);
#if defined (ACE_WIN32)
- // @@ TODO MSVC++ compiler has some kind of issue (read
- // *bug*) wrt nested classes in constructors, if the fully
- // qualified name is used it gets all confused. Quite to my
- // dismay the work around is to use a non-qualified name for
- // the base class!
- // I wish I never have to know why the symbol table for
- // MSVC++ can get so confused ;-) (coryan)
- *ss << " " << parent->local_coll_name () << " (servant, stub),"
- << be_nl;
+ // @@ TODO MSVC++ compiler has some kind of issue (read
+ // *bug*) wrt nested classes in constructors, if the fully
+ // qualified name is used it gets all confused. Quite to my
+ // dismay the work around is to use a non-qualified name for
+ // the base class!
+ // I wish I never have to know why the symbol table for
+ // MSVC++ can get so confused ;-) (coryan)
+ *ss << " " << parent->local_coll_name () << " (servant, stub),"
+ << be_nl;
#else
- *ss << " " << parent->full_coll_name () << " (servant, stub),"
- << be_nl;
+ *ss << " " << parent->full_coll_name () << " (servant, stub),"
+ << be_nl;
#endif /* ACE_WIN32 */
- }
+ }
}
*ss << " CORBA_Object (stub, servant, CORBA::B_TRUE)," << be_nl
@@ -310,26 +308,26 @@ int be_visitor_collocated_ss::visit_interface (be_interface *node)
{
UTL_ScopeActiveIterator *si;
ACE_NEW_RETURN (si,
- UTL_ScopeActiveIterator (node,
- UTL_Scope::IK_decls),
- -1);
+ UTL_ScopeActiveIterator (node,
+ UTL_Scope::IK_decls),
+ -1);
while (!si->is_done ())
- {
- AST_Decl *d = si->item ();
- si->next ();
- be_decl *bd = be_decl::narrow_from_decl (d);
- // Only printout the operations, nested interfaces and
- // structures only go in the main declaration.
- if (d->imported () || bd == 0)
- {
- continue;
- }
- if (bd->accept (this) == -1)
- {
- delete si;
- return -1;
- }
- }
+ {
+ AST_Decl *d = si->item ();
+ si->next ();
+ be_decl *bd = be_decl::narrow_from_decl (d);
+ // Only printout the operations, nested interfaces and
+ // structures only go in the main declaration.
+ if (d->imported () || bd == 0)
+ {
+ continue;
+ }
+ if (bd->accept (this) == -1)
+ {
+ delete si;
+ return -1;
+ }
+ }
delete si;
}
@@ -341,7 +339,6 @@ int be_visitor_collocated_ss::visit_operation (be_operation *node)
// retrieve a singleton instance of the code generator
TAO_CodeGen *cg = TAO_CODEGEN::instance ();
TAO_OutStream *ss = cg->server_skeletons ();
- TAO_NL nl;
// retrieve the return type again because we have used bt to also retrieve
// the argument types
@@ -361,18 +358,18 @@ int be_visitor_collocated_ss::visit_operation (be_operation *node)
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) args decl failed\n"), -1);
}
-
+
*ss << "\n";
ss->indent ();
*ss << "{\n";
ss->incr_indent ();
-
+
if (bt->node_type () != AST_Decl::NT_pre_defined
|| be_predefined_type::narrow_from_decl (bt)->pt () != AST_PredefinedType::PT_void)
{
*ss << "return ";
}
-
+
*ss << "this->servant_->" << node->local_name () << " (\n";
ss->incr_indent (0);
ss->incr_indent (0);
@@ -386,7 +383,7 @@ int be_visitor_collocated_ss::visit_operation (be_operation *node)
ss->decr_indent (0);
ss->decr_indent (0);
*ss << "}\n\n";
-
+
return 0;
}
@@ -415,28 +412,28 @@ int be_visitor_collocated_ss::visit_attribute (be_attribute *node)
if (!node->readonly ())
{
- *ss << be_nl
- << "void "
- << this->current_interface_->full_coll_name ()
- << "::" << node->local_name ()
- << " (" << be_idt << be_idt_nl;
-
+ *ss << be_nl
+ << "void "
+ << this->current_interface_->full_coll_name ()
+ << "::" << node->local_name ()
+ << " (" << be_idt << be_idt_nl;
+
be_visitor_args_decl vdecl (ss);
vdecl.current_type_name (bt->name ());
vdecl.argument_direction (AST_Argument::dir_IN);
if (bt->accept (&vdecl) == -1)
- return -1;
+ return -1;
*ss << "_tao_value," << be_nl
- << "CORBA::Environment &_tao_environment" << be_uidt_nl
- << ")" << be_uidt_nl
- << "{" << be_idt_nl
- << "this->servant_->" << node->local_name ()
- << " (" << be_idt << be_idt_nl
- << "_tao_value," << be_nl
- << "_tao_environment" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "}\n\n";
+ << "CORBA::Environment &_tao_environment" << be_uidt_nl
+ << ")" << be_uidt_nl
+ << "{" << be_idt_nl
+ << "this->servant_->" << node->local_name ()
+ << " (" << be_idt << be_idt_nl
+ << "_tao_value," << be_nl
+ << "_tao_environment" << be_uidt_nl
+ << ");" << be_uidt << be_uidt_nl
+ << "}\n\n";
}
return 0;
}