diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 18:58:19 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-06-09 18:58:19 +0000 |
commit | fa8700c14f826116210249ce5372bb89c91ca41b (patch) | |
tree | 74f5beb0a898d4754ff1630fa3289725bc6d4145 | |
parent | 741f548c3b0099d0116148484d40e2fb3efd4b8a (diff) | |
download | ATCD-fa8700c14f826116210249ce5372bb89c91ca41b.tar.gz |
ChangeLogTag: Mon Jun 9 13:51:19 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 16 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp | 9 |
5 files changed, 38 insertions, 15 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 465c81e6e64..42c2118d965 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,19 @@ +Mon Jun 9 13:51:19 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_visitor_interface/interface_ih.cpp: + * TAO_IDL/be/be_visitor_interface/interface_is.cpp: + + Added context state initialization to the visitor created + to traverse the interface inheritance graph when generating + code for the implementation classes. Thanks to + Tommy Andreasen <Tommy.Andreasen@Radiometer.dk> for reporting the + bug. Also added annotation generation and fixed indentation. + + * TAO_IDL/be/be_visitor_operation/operation_ih.cpp: + * TAO_IDL/be/be_visitor_operation/operation_is.cpp: + + Added annotation and fixed indentation of generated code. + Mon Jun 9 12:33:20 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * tao/Strategies/SCIOP_Endpoint.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp index 20a97609974..aaee04c9cca 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp @@ -51,12 +51,10 @@ be_visitor_interface_ih::visit_interface (be_interface *node) // Generate the skeleton class name. - os->indent (); - ACE_OS::sprintf (namebuf, "%s", node->flat_name ()); - *os << "//Class " << be_global->impl_class_prefix () - << namebuf << be_global->impl_class_suffix () << be_nl; + *os << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; // Now generate the class definition. *os << "class " << be_global->stub_export_macro () @@ -104,7 +102,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node) *os << "//Destructor " << be_nl << "virtual " << "~" << be_global->impl_class_prefix () << namebuf - << be_global->impl_class_suffix () << " (void);" << be_nl << be_uidt_nl; + << be_global->impl_class_suffix () << " (void);" << be_nl << be_nl; // Generate code for elements in the scope (e.g., operations). @@ -135,7 +133,9 @@ be_visitor_interface_ih::visit_interface (be_interface *node) } - *os << "};" << be_nl <<be_nl; + *os << be_nl + << "};" << be_nl << be_nl; + return 0; } @@ -150,6 +150,7 @@ be_visitor_interface_ih::method_helper (be_interface *derived, if (strcmp (derived->flat_name (), node->flat_name ()) != 0) { be_visitor_context ctx; + ctx.state (TAO_CodeGen::TAO_ROOT_IH); ctx.interface (derived); ctx.stream (os); be_visitor_interface_ih visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp index 66f34051c95..871d440b138 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp @@ -48,7 +48,8 @@ be_visitor_interface_is::visit_interface (be_interface *node) // Generate the skeleton class name. - os->indent (); + *os << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; *os << "// Implementation skeleton constructor" << be_nl; @@ -57,10 +58,10 @@ be_visitor_interface_is::visit_interface (be_interface *node) << be_global->impl_class_suffix () <<"::" << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () - << " (void)" << be_idt_nl; + << " (void)" << be_nl; *os << "{" << be_nl - << "}" << be_nl << be_uidt_nl; + << "}" << be_nl << be_nl; os->indent (); *os << "// Implementation skeleton destructor" << be_nl; @@ -69,10 +70,10 @@ be_visitor_interface_is::visit_interface (be_interface *node) << be_global->impl_class_suffix () <<"::~" << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () - << " (void)" << be_idt_nl; + << " (void)" << be_nl; *os << "{" <<be_nl; - *os << "}" << be_nl <<be_uidt_nl; + *os << "}" << be_nl << be_nl; if (be_global->gen_copy_ctor ()) { @@ -149,6 +150,7 @@ be_visitor_interface_is::method_helper (be_interface *derived, if (ACE_OS::strcmp (derived->flat_name (), node->flat_name ()) != 0) { be_visitor_context ctx; + ctx.state (TAO_CodeGen::TAO_ROOT_IS); ctx.interface (derived); ctx.stream (os); be_visitor_interface_is visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp index 5ba720bb3b4..5b4a06d90c2 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp @@ -39,6 +39,9 @@ be_visitor_operation_ih::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); // save the node + *os << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__; + // every operation is declared virtual in the client code *os << be_nl << be_nl << "virtual "; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp index 7cbb014e3db..68bcf749932 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp @@ -41,8 +41,6 @@ be_visitor_operation_is::visit_operation (be_operation *node) this->ctx_->node (node); // save the node - os->indent (); // start with the current indentation level - // STEP I: generate the return type be_type *bt = be_type::narrow_from_decl (node->return_type ()); @@ -55,6 +53,9 @@ be_visitor_operation_is::visit_operation (be_operation *node) -1); } + *os << "// TAO_IDL - Generated from" << be_nl + << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + be_visitor_context ctx (*this->ctx_); be_visitor_operation_rettype oro_visitor (&ctx); @@ -98,9 +99,9 @@ be_visitor_operation_is::visit_operation (be_operation *node) -1); } - *os << be_idt_nl << "{" << be_idt_nl; + *os << be_nl << "{" << be_idt_nl; *os << "// Add your implementation here" << be_uidt_nl; - *os << "}" << be_nl << be_uidt_nl; + *os << "}" << be_nl << be_nl; return 0; } |