diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-02 18:47:34 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-02 18:47:34 +0000 |
commit | a477f0bcb53fcda1920e312bb901f8d53e9c452e (patch) | |
tree | 5c9e3cb0840b69e94e8d3b9c4c06e575a15414bd | |
parent | c00482285ad0edfe4aaa8e134075cd56610052e0 (diff) | |
download | ATCD-a477f0bcb53fcda1920e312bb901f8d53e9c452e.tar.gz |
ChangeLogTag: Tue Nov 2 12:23:20 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp | 29 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp | 3 |
5 files changed, 44 insertions, 18 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 5327a5b90ba..dc8016d2600 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Tue Nov 2 12:23:20 2004 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ch.cpp: + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: + * TAO_IDL/be/be_visitor_operation/operation_ch.cpp: + + - Fixed a bug that occurs when a local interface inherits + from one or more abstract interfaces with operations. + The inherited operations were getting generated twice, + once without being pure virtual as required for local + interfaces. + + - Removed generation of the function pointer for collocation + factory initialization when we have a local interface, since + it's not relevant in that case. + Tue Nov 2 09:43:18 2004 J.T. Conklin <jtc@acorntoolworks.com> * orbsvcs/FT_ReplicationManager/FT_ReplicationManager.mpc: diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 2c6c83f4e6a..afc3e613014 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -708,9 +708,10 @@ Pure_Virtual_Regenerator::emit (be_interface *derived_interface, return 0; } - // A parent that's local will already have its operations declared - // as pure virtual. - if (base_interface->is_local ()) + // If the parent is local, it will already have its operations declared + // as pure virtual, and if it's abstract, its operations will already + // be generated as pure virtual for the derived local interface. + if (base_interface->is_local () || base_interface->is_abstract ()) { return 0; } @@ -718,8 +719,8 @@ Pure_Virtual_Regenerator::emit (be_interface *derived_interface, be_decl *d = 0; for (UTL_ScopeActiveIterator si (base_interface, UTL_Scope::IK_decls); - !si.is_done (); - si.next ()) + !si.is_done (); + si.next ()) { d = be_decl::narrow_from_decl (si.item ()); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index 40bfb4dd5c5..63c9f77a75e 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -431,7 +431,7 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node, be_operation new_op (op->return_type (), op->flags (), &item_new_name, - op->is_local (), + node->is_local (), op->is_abstract ()); new_op.set_defined_in (node); be_visitor_interface::add_abstract_op_args (op, diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 60662cae6f1..3508ac2e6da 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -142,17 +142,20 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "}"; } - // Generate the proxy broker factory function pointer definition. - *os << be_nl << be_nl - << "// Function pointer for collocation factory initialization." - << be_nl - << "TAO::Collocation_Proxy_Broker * " << be_nl - << "(*" << node->flat_client_enclosing_scope () - << node->base_proxy_broker_name () - << "_Factory_function_pointer) (" - << be_idt << be_idt_nl - << "CORBA::Object_ptr obj" << be_uidt_nl - << ") = 0;" << be_uidt; + if (!node->is_local ()) + { + // Generate the proxy broker factory function pointer definition. + *os << be_nl << be_nl + << "// Function pointer for collocation factory initialization." + << be_nl + << "TAO::Collocation_Proxy_Broker * " << be_nl + << "(*" << node->flat_client_enclosing_scope () + << node->base_proxy_broker_name () + << "_Factory_function_pointer) (" + << be_idt << be_idt_nl + << "CORBA::Object_ptr obj" << be_uidt_nl + << ") = 0;" << be_uidt; + } // Generate code for the elements of the interface. if (this->visit_scope (node) == -1) @@ -587,7 +590,9 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, be_interface *base, TAO_OutStream *os) { - if (!base->is_abstract ()) + // If the derived interface is local, the abstract parent's operation + // was generated as pure virtual. + if (!base->is_abstract () || node->is_local ()) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp index dbc17505b5f..5df8b45311e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ch.cpp @@ -44,6 +44,9 @@ be_visitor_operation_ch::visit_operation (be_operation *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + + const char *name = ScopeAsDecl (node->defined_in ())->full_name (); + *os << "// " << name << be_nl << be_nl; // Every operation is declared virtual in the client code. *os << "virtual "; |