summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-03 14:02:36 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-03 14:02:36 +0000
commit57f6237cea56d852591eafc34a0969cc06076f1b (patch)
tree0b5f71305eb71c19d9d27ecf4b9154db31963f72
parentf6bcb8964deb3d223108489fdbaa3cb511710871 (diff)
downloadATCD-57f6237cea56d852591eafc34a0969cc06076f1b.tar.gz
ChangeLogTag: Tue Aug 3 13:59:58 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog125
-rw-r--r--TAO/TAO_IDL/be/be_component.cpp76
-rw-r--r--TAO/TAO_IDL/be/be_extended_port.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp146
-rw-r--r--TAO/TAO_IDL/be/be_type.cpp62
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/argument.cpp93
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp158
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp67
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp53
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp98
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/any_op_ch.cpp43
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/any_op_cs.cpp48
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/cdr_op_ch.cpp43
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/cdr_op_cs.cpp38
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp269
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_ci.cpp64
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp343
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp19
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp15
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp30
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp16
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp313
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp19
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp234
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module/module.cpp14
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp26
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp13
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp55
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp46
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp31
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp53
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp18
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp87
-rw-r--r--TAO/TAO_IDL/be_include/be_component.h15
-rw-r--r--TAO/TAO_IDL/be_include/be_interface.h9
-rw-r--r--TAO/TAO_IDL/be_include/be_type.h3
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_argument/argument.h10
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/any_op_ch.h38
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/any_op_cs.h37
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_ch.h39
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_cs.h39
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/component_ch.h37
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/component_ci.h37
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h37
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_component_scope.h2
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface.h1
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/interface.h31
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h9
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h7
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h9
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h34
-rw-r--r--TAO/tao/Adapter.h3
-rw-r--r--TAO/tao/AnyTypeCode/AnyTypeCode_methods.h20
-rw-r--r--TAO/tao/AnyTypeCode/NVList.cpp12
-rw-r--r--TAO/tao/AnyTypeCode/NVList.h9
-rw-r--r--TAO/tao/AnyTypeCode/NVList.inl38
-rw-r--r--TAO/tao/AnyTypeCode/TypeCode.cpp5
-rw-r--r--TAO/tao/AnyTypeCode/TypeCode.inl13
-rw-r--r--TAO/tao/CORBA_methods.h35
-rw-r--r--TAO/tao/DynamicInterface/Context.cpp8
-rw-r--r--TAO/tao/DynamicInterface/Context.h14
-rw-r--r--TAO/tao/DynamicInterface/Context.inl40
-rw-r--r--TAO/tao/DynamicInterface/DII_CORBA_methods.h32
-rw-r--r--TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp6
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.cpp8
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.h8
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.inl21
-rw-r--r--TAO/tao/DynamicInterface/Request.cpp4
-rw-r--r--TAO/tao/DynamicInterface/Request.h4
-rw-r--r--TAO/tao/DynamicInterface/Request.inl21
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.cpp4
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.h8
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.inl21
-rw-r--r--TAO/tao/Environment.cpp6
-rw-r--r--TAO/tao/Environment.h7
-rw-r--r--TAO/tao/Environment.inl15
-rw-r--r--TAO/tao/IFR_Client/IFR_Client_Adapter_Impl.cpp4
-rw-r--r--TAO/tao/IORManipulation/IORManip_Filter.h6
-rw-r--r--TAO/tao/ORB.h13
-rw-r--r--TAO/tao/ORB.inl25
-rw-r--r--TAO/tao/Object.cpp5
-rw-r--r--TAO/tao/Object.h9
-rw-r--r--TAO/tao/Object.inl50
-rw-r--r--TAO/tao/Principal.cpp5
-rw-r--r--TAO/tao/Principal.h5
-rw-r--r--TAO/tao/Principal.inl23
-rw-r--r--TAO/tao/Unbounded_Sequence_CDR_T.h2
-rw-r--r--TAO/tao/Valuetype/AbstractBase.cpp24
-rw-r--r--TAO/tao/Valuetype/AbstractBase.h7
-rw-r--r--TAO/tao/Valuetype/AbstractBase.inl6
-rw-r--r--TAO/tao/Valuetype/Value_CORBA_methods.h9
-rw-r--r--TAO/tao/ZIOP_Adapter.cpp4
102 files changed, 1515 insertions, 2248 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index c5cab7d5304..56be48a08ca 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,128 @@
+Tue Aug 3 13:59:58 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_component/any_op_ch.cpp:
+ * TAO_IDL/be/be_visitor_component/any_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_component/component_ch.cpp:
+ * TAO_IDL/be/be_visitor_component/component_ci.cpp:
+ * TAO_IDL/be/be_visitor_component/cdr_op_ch.cpp:
+ * TAO_IDL/be/be_visitor_component/component_cs.cpp:
+ * TAO_IDL/be/be_visitor_component/cdr_op_cs.cpp:
+ * TAO_IDL/be_include/be_visitor_component/cdr_op_cs.h:
+ * TAO_IDL/be_include/be_visitor_component/any_op_ch.h:
+ * TAO_IDL/be_include/be_visitor_component/any_op_cs.h:
+ * TAO_IDL/be_include/be_visitor_component/component_ch.h:
+ * TAO_IDL/be_include/be_visitor_component/component_ci.h:
+ * TAO_IDL/be_include/be_visitor_component/cdr_op_ch.h:
+ * TAO_IDL/be_include/be_visitor_component/component_cs.h:
+
+ Removed these files, the contained visitors are now
+ replaced in the traversal by the corresponding interface
+ visitor.
+
+ * TAO_IDL/be/be_visitor_exception/exception_ch.cpp:
+ * TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp:
+ * TAO_IDL/be/be_visitor_argument/invoke_cs.cpp:
+ * TAO_IDL/be/be_visitor_argument/argument.cpp:
+ * TAO_IDL/be/be_visitor_argument/upcall_ss.cpp:
+ * TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp:
+ * TAO_IDL/be/be_visitor_argument/marshal_ss.cpp:
+ * TAO_IDL/be/be_visitor_component.cpp:
+ * TAO_IDL/be/be_visitor_operation/operation_ss.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_ch.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_ci.cpp:
+ * TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_cs.cpp:
+ * TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_interface/any_op_ch.cpp:
+ * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp:
+ * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp:
+ * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp:
+ * TAO_IDL/be/be_type.cpp:
+ * TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp:
+ * TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp:
+ * TAO_IDL/be/be_component.cpp:
+ * TAO_IDL/be/be_visitor_interface.cpp:
+ * TAO_IDL/be/be_visitor_module/module.cpp:
+ * TAO_IDL/be/be_visitor_union/union_ch.cpp:
+ * TAO_IDL/be/be_visitor_structure/structure_ch.cpp:
+ * TAO_IDL/be/be_extended_port.cpp:
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be_include/be_interface.h:
+ * TAO_IDL/be_include/be_component.h:
+ * TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h:
+ * TAO_IDL/be_include/be_visitor_argument/argument.h:
+ * TAO_IDL/be_include/be_type.h:
+ * TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h:
+ * TAO_IDL/be_include/be_visitor_interface/any_op_ch.h:
+ * TAO_IDL/be_include/be_visitor_interface/interface.h:
+ * TAO_IDL/be_include/be_visitor_interface/any_op_cs.h:
+ * TAO_IDL/be_include/be_visitor_interface/interface_ch.h:
+ * TAO_IDL/be_include/be_visitor_interface/interface_ci.h:
+ * TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h:
+ * TAO_IDL/be_include/be_visitor_interface/interface_cs.h:
+ * TAO_IDL/be_include/be_visitor_component_scope.h:
+ * TAO_IDL/be_include/be_visitor_interface.h:
+ * TAO_IDL/be_include/be_visitor_component.h:
+
+ - Factored common stub header file code generation into
+ a method in class be_type.
+
+ - Abstracted differences in stub code generation between
+ interfaces and components into methods on the
+ corresponding node classes.
+
+ - Replaced calls to component visitors for stub, cdr op
+ and any op generation with the corresponding interface
+ visitors.
+
+ * tao/Object.inl:
+ * tao/AnyTypeCode/TypeCode.cpp:
+ * tao/AnyTypeCode/AnyTypeCode_methods.h:
+ * tao/AnyTypeCode/TypeCode.inl:
+ * tao/AnyTypeCode/NVList.h:
+ * tao/AnyTypeCode/NVList.cpp:
+ * tao/AnyTypeCode/NVList.inl:
+ * tao/Adapter.h:
+ * tao/IFR_Client/IFR_Client_Adapter_Impl.cpp:
+ * tao/ZIOP_Adapter.cpp:
+ * tao/Unbounded_Sequence_CDR_T.h:
+ * tao/DynamicInterface/ExceptionList.h:
+ * tao/DynamicInterface/Server_Request.h:
+ * tao/DynamicInterface/Context.h:
+ * tao/DynamicInterface/ExceptionList.cpp:
+ * tao/DynamicInterface/ExceptionList.inl:
+ * tao/DynamicInterface/Request.h:
+ * tao/DynamicInterface/DII_CORBA_methods.h:
+ * tao/DynamicInterface/Dynamic_Adapter_Impl.cpp:
+ * tao/DynamicInterface/Server_Request.inl:
+ * tao/DynamicInterface/Server_Request.cpp:
+ * tao/DynamicInterface/Context.cpp:
+ * tao/DynamicInterface/Context.inl:
+ * tao/DynamicInterface/Request.inl:
+ * tao/DynamicInterface/Request.cpp:
+ * tao/CORBA_methods.h:
+ * tao/Environment.h:
+ * tao/ORB.h:
+ * tao/Environment.cpp:
+ * tao/Object.h:
+ * tao/IORManipulation/IORManip_Filter.h:
+ * tao/Principal.cpp:
+ * tao/Principal.h:
+ * tao/Valuetype/AbstractBase.h:
+ * tao/Valuetype/AbstractBase.inl:
+ * tao/Valuetype/AbstractBase.cpp:
+ * tao/Valuetype/Value_CORBA_methods.h:
+ * tao/Object.cpp::
+ * tao/ORB.inl
+ * tao/Environment.inl:
+ * tao/Principal.inl:
+
+ Made CORBA::is_nil() and CORBA::release() into
+ template functions, and removed all the overloads.
+ This fix closes [BUGID:3854].
+
Tue Aug 3 12:07:11 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* MPC/config/taodefaults.mpb:
diff --git a/TAO/TAO_IDL/be/be_component.cpp b/TAO/TAO_IDL/be/be_component.cpp
index 518ea569ba3..ae98d54df43 100644
--- a/TAO/TAO_IDL/be/be_component.cpp
+++ b/TAO/TAO_IDL/be/be_component.cpp
@@ -15,6 +15,7 @@
#include "be_component.h"
#include "be_visitor.h"
+#include "be_helper.h"
#include "ast_mirror_port.h"
#include "ast_uses.h"
@@ -274,6 +275,81 @@ be_component::scan (UTL_Scope *s)
}
void
+be_component::gen_stub_inheritance (TAO_OutStream *os)
+{
+ this->analyze_parentage ();
+
+ *os << "public virtual ::";
+
+ AST_Component *parent = this->base_component ();
+
+ if (parent != 0)
+ {
+ *os << parent->name ();
+ }
+ else
+ {
+ *os << "Components::CCMObject";
+ }
+
+ long nsupports = this->n_inherits ();
+
+ if (nsupports > 0)
+ {
+ *os << be_idt;
+
+ AST_Type **supp_list = this->supports ();
+
+ for (long i = 0; i < nsupports; ++i)
+ {
+ *os << ", " << be_nl
+ << "public virtual ::"
+ << supp_list[i]->name ();
+ }
+
+ *os << be_uidt;
+ }
+
+ *os << be_uidt;
+}
+
+int
+be_component::gen_is_a_ancestors (TAO_OutStream *os)
+{
+ AST_Component *ancestor = this;
+
+ while (ancestor != 0)
+ {
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
+ << "value," << be_nl
+ << "\"" << ancestor->repoID () << "\"" << be_uidt_nl
+ << ") == 0 ||" << be_uidt_nl;
+
+ ancestor = ancestor->base_component ();
+ }
+
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
+ << "value," << be_nl
+ << "\"IDL:omg.org/Components/CCMObject:1.0\"" << be_uidt_nl
+ << ") == 0" << be_uidt << be_uidt_nl;
+
+ return 0;
+}
+
+void
+be_component::gen_parent_collocation (TAO_OutStream *os)
+{
+ AST_Component *base = this->base_component ();
+
+ if (base != 0)
+ {
+ *os << be_nl
+ << "this->" << base->flat_name ()
+ << "_setup_collocation" << " ();";
+ }
+}
+
+void
be_component::mirror_scan (AST_PortType *pt)
{
AST_Uses *u = 0;
diff --git a/TAO/TAO_IDL/be/be_extended_port.cpp b/TAO/TAO_IDL/be/be_extended_port.cpp
index 079688d40aa..6198e5ee340 100644
--- a/TAO/TAO_IDL/be/be_extended_port.cpp
+++ b/TAO/TAO_IDL/be/be_extended_port.cpp
@@ -43,7 +43,6 @@ be_extended_port::destroy (void)
this->be_field::destroy ();
}
-
int
be_extended_port::accept (be_visitor *visitor)
{
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 22599f418bb..5af079cbab3 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -2161,10 +2161,10 @@ be_interface::is_a_helper (be_interface * /*derived*/,
TAO_OutStream *os)
{
// Emit the comparison code.
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
<< "value," << be_nl
<< "\"" << bi->repoID () << "\"" << be_uidt_nl
- << ") ||" << be_uidt_nl;
+ << ") == 0 ||" << be_uidt_nl;
return 0;
}
@@ -2920,6 +2920,148 @@ be_interface::dds_connector_traits_done (bool val)
this->dds_connector_traits_done_ = val;
}
+void
+be_interface::gen_stub_inheritance (TAO_OutStream *os)
+{
+ long i;
+ long nparents = this->n_inherits ();
+ bool has_concrete_parent = false;
+ bool i_am_abs = this->is_abstract ();
+
+ // If node interface inherits from other interfaces.
+ if (nparents > 0)
+ {
+ *os << be_idt;
+
+ AST_Type **parents = this->inherits ();
+
+ for (i = 0; i < nparents; ++i)
+ {
+ AST_Type *parent = parents[i];
+
+ if (! parent->is_abstract ())
+ {
+ has_concrete_parent = true;
+ }
+
+ *os << "public virtual ::"
+ << parent->name ();
+
+ if (i < nparents - 1)
+ {
+ // Node has multiple inheritance, so put a comma.
+ *os << "," << be_nl;
+ }
+ }
+
+ if (has_concrete_parent || i_am_abs)
+ {
+ *os << be_uidt << be_uidt_nl;
+ }
+ else if (! i_am_abs)
+ {
+ *os << "," << be_nl;
+ }
+ }
+
+ if (i_am_abs && nparents == 0)
+ {
+ *os << "public virtual ::CORBA::AbstractBase"
+ << be_uidt_nl;
+ }
+
+ if (! has_concrete_parent && ! i_am_abs)
+ {
+ *os << "public virtual ::CORBA::Object";
+
+ if (nparents > 0)
+ {
+ *os << be_uidt;
+ }
+
+ *os << be_uidt;
+ }
+}
+
+int
+be_interface::gen_is_a_ancestors (TAO_OutStream *os)
+{
+ int const status =
+ this->traverse_inheritance_graph (be_interface::is_a_helper,
+ os);
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_interface::")
+ ACE_TEXT ("gen_is_a_ancestors - ")
+ ACE_TEXT ("traverse_inheritance_graph failed\n")),
+ -1);
+ }
+
+ if (this->is_abstract () || this->has_mixed_parentage ())
+ {
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
+ << "value," << be_nl
+ << "\"IDL:omg.org/CORBA/AbstractBase:1.0\"" << be_uidt_nl
+ << ") == 0";
+ }
+ else if (this->is_local ())
+ {
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
+ << "value," << be_nl
+ << "\"IDL:omg.org/CORBA/LocalObject:1.0\"" << be_uidt_nl
+ << ") == 0";
+ }
+
+ if (this->has_mixed_parentage () || this->is_local ())
+ {
+ *os << " ||" << be_uidt_nl;
+ }
+ else if (this->is_abstract ())
+ {
+ *os << be_uidt << be_uidt_nl;
+ }
+
+ if (! this->is_abstract ())
+ {
+ *os << "ACE_OS::strcmp (" << be_idt << be_idt_nl
+ << "value," << be_nl
+ << "\"IDL:omg.org/CORBA/Object:1.0\"" << be_uidt_nl
+ << ") == 0" << be_uidt << be_uidt_nl;
+ }
+
+ return 0;
+}
+
+void
+be_interface::gen_parent_collocation (TAO_OutStream *os)
+{
+ long n_parents = this->n_inherits ();
+ bool has_parent = false;
+ AST_Type **parents = this->inherits ();
+
+ if (n_parents > 0)
+ {
+ for (long i = 0; i < n_parents; ++i)
+ {
+ be_interface *inherited =
+ be_interface::narrow_from_decl (parents[i]);
+
+ if (!has_parent)
+ {
+ *os << be_nl;
+ }
+
+ has_parent = true;
+
+ *os << be_nl
+ << "this->" << inherited->flat_name ()
+ << "_setup_collocation" << " ();";
+ }
+ }
+}
+
// =================================================================
class Facet_Op_Attr_Helper
diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp
index 8f9f119a1fd..c71c22bf93a 100644
--- a/TAO/TAO_IDL/be/be_type.cpp
+++ b/TAO/TAO_IDL/be/be_type.cpp
@@ -19,6 +19,11 @@
#include "be_visitor.h"
#include "be_codegen.h"
#include "be_helper.h"
+#include "be_extern.h"
+
+#include "ast_valuetype.h"
+#include "ast_sequence.h"
+
#include "utl_identifier.h"
#include "idl_defines.h"
#include "nr_extern.h"
@@ -283,6 +288,63 @@ be_type::gen_common_varout (TAO_OutStream *os)
this->common_varout_gen_ = true;
}
+void
+be_type::gen_stub_decls (TAO_OutStream *os)
+{
+ if (this->anonymous ())
+ {
+ return;
+ }
+
+ *os << be_nl << be_nl
+ << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
+
+ *os << be_nl;
+
+ AST_Interface *i = AST_Interface::narrow_from_decl (this);
+ AST_ValueType *v = AST_ValueType::narrow_from_decl (this);
+
+ if (i != 0)
+ {
+ *os << be_nl
+ << "typedef " << this->local_name ()
+ << (v == 0 ? "_ptr" : " *") << " _ptr_type;";
+ }
+
+ bool skip_varout = false;
+ AST_Sequence *s = AST_Sequence::narrow_from_decl (this);
+
+ if (s != 0)
+ {
+ // _vars and _outs not supported yet by alt mapping.
+ if (be_global->alt_mapping () && s->unbounded ())
+ {
+ skip_varout = true;
+ }
+ }
+
+ if (!skip_varout)
+ {
+ *os << be_nl
+ << "typedef " << this->local_name ()
+ << "_var _var_type;" << be_nl
+ << "typedef " << this->local_name ()
+ << "_out _out_type;";
+ }
+
+ bool gen_any_destructor =
+ be_global->any_support ()
+ && (!this->is_local ()
+ || be_global->gen_local_iface_anyops ());
+
+ if (gen_any_destructor)
+ {
+ *os << be_nl << be_nl
+ << "static void _tao_any_destructor (void *);";
+ }
+}
+
bool
be_type::seen_in_sequence (void) const
{
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp
index b20bc5f29b5..7bd31dbdffa 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
be_visitor_args::be_visitor_args (be_visitor_context *ctx)
: be_visitor_decl (ctx),
fixed_direction_ (-1)
@@ -42,7 +41,8 @@ be_visitor_args::type_name (be_type *node,
be_type *bt = 0;
- // Use the typedefed name if that is the one used in the IDL defn.
+ // Use the typedefed name if that is the one
+ // used in the IDL defn.
if (this->ctx_->alias ())
{
bt = this->ctx_->alias ();
@@ -87,3 +87,92 @@ be_visitor_args::set_fixed_direction (AST_Argument::Direction direction)
{
this->fixed_direction_ = direction;
}
+
+int
+be_visitor_args::gen_pd_arg (be_predefined_type *node,
+ bool for_stub)
+{
+ TAO_CodeGen::CG_SUB_STATE ss = this->ctx_->sub_state ();
+ AST_Argument::Direction d = this->direction ();
+
+ bool in_arg = (d == AST_Argument::dir_IN);
+ bool out_arg = (d == AST_Argument::dir_OUT);
+ bool out_stream = (ss == TAO_CodeGen::TAO_CDR_OUTPUT);
+ bool in_stream = (ss == TAO_CodeGen::TAO_CDR_INPUT);
+
+ bool skip = (in_arg && for_stub && in_stream)
+ || (in_arg && !for_stub && out_stream)
+ || (out_arg && for_stub && out_stream)
+ || (out_arg && !for_stub && in_stream);
+
+ if (skip)
+ {
+ return 0;
+ }
+
+ TAO_OutStream *os = this->ctx_->stream ();
+ const char *var_call = "";
+ const char *any_deref = "";
+
+ AST_PredefinedType::PredefinedType pt = node->pt ();
+ bool is_any = (pt == AST_PredefinedType::PT_any);
+
+ if (for_stub)
+ {
+ if (in_stream && out_arg)
+ {
+ var_call = ".ptr ()";
+ any_deref = "*";
+ }
+ }
+ else if (out_stream)
+ {
+ var_call = ".in ()";
+
+ if (is_any && !out_arg)
+ {
+ var_call = "";
+ }
+ }
+ else if (!is_any)
+ {
+ var_call = ".out ()";
+ }
+
+ ACE_CString to_from_str = (in_stream
+ ? "::ACE_InputCDR::to_"
+ : "::ACE_OutputCDR::from_");
+
+ const char *to_from = to_from_str.c_str ();
+
+ be_argument *arg =
+ be_argument::narrow_from_decl (this->ctx_->node ());
+ const char *lname = arg->local_name ()->get_string ();
+
+ switch (pt)
+ {
+ case AST_PredefinedType::PT_any:
+ *os << any_deref; // No break.
+ case AST_PredefinedType::PT_pseudo:
+ case AST_PredefinedType::PT_object:
+ *os << lname << var_call;
+ break;
+ case AST_PredefinedType::PT_char:
+ *os << to_from << "char (" << lname << ")";
+ break;
+ case AST_PredefinedType::PT_wchar:
+ *os << to_from << "wchar (" << lname << ")";
+ break;
+ case AST_PredefinedType::PT_boolean:
+ *os << to_from << "boolean (" << lname << ")";
+ break;
+ case AST_PredefinedType::PT_octet:
+ *os << to_from << "octet (" << lname << ")";
+ break;
+ default:
+ *os << lname;
+ break;
+ }
+
+ return 0;
+} \ No newline at end of file
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp
index 8ba0a965e8b..0e58a418363 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp
@@ -29,15 +29,16 @@ be_visitor_args_invoke_cs::
int be_visitor_args_invoke_cs::visit_argument (be_argument *node)
{
- this->ctx_->node (node); // save the argument node
- be_type *bt = be_type::narrow_from_decl (node->field_type ());
+ this->ctx_->node (node);
+ be_type *bt =
+ be_type::narrow_from_decl (node->field_type ());
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_argument - "
- "Bad argument type\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("Bad argument type\n")),
-1);
}
@@ -73,18 +74,18 @@ int be_visitor_args_invoke_cs::visit_argument (be_argument *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_argument - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
if (bt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_argument - "
- "cannot accept visitor\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("cannot accept visitor\n")),
-1);
}
@@ -115,9 +116,9 @@ int be_visitor_args_invoke_cs::visit_argument (be_argument *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_argument - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
@@ -162,9 +163,9 @@ int be_visitor_args_invoke_cs::visit_array (be_array *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_array - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_array - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
@@ -204,43 +205,51 @@ int be_visitor_args_invoke_cs::visit_enum (be_enum *)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_enum - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_enum - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
return 0;
}
-int be_visitor_args_invoke_cs::visit_interface (be_interface *)
+int be_visitor_args_invoke_cs::visit_interface (
+ be_interface *)
{
return this->emit_common ();
}
-int be_visitor_args_invoke_cs::visit_interface_fwd (be_interface_fwd *)
+int be_visitor_args_invoke_cs::visit_interface_fwd (
+ be_interface_fwd *)
{
return this->emit_common ();
}
-int be_visitor_args_invoke_cs::visit_valuebox (be_valuebox *)
+int be_visitor_args_invoke_cs::visit_valuebox (
+ be_valuebox *)
{
return this->emit_common ();
}
-int be_visitor_args_invoke_cs::visit_valuetype (be_valuetype *)
+int be_visitor_args_invoke_cs::visit_valuetype (
+ be_valuetype *)
{
return this->emit_common ();
}
int
-be_visitor_args_invoke_cs::visit_valuetype_fwd (be_valuetype_fwd *)
+be_visitor_args_invoke_cs::visit_valuetype_fwd (
+ be_valuetype_fwd *)
{
return this->emit_common ();
}
-int be_visitor_args_invoke_cs::visit_predefined_type (be_predefined_type *node)
+int be_visitor_args_invoke_cs::visit_predefined_type (
+ be_predefined_type *node)
{
+ int status = this->gen_pd_arg (node, true);
+ /*
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
be_argument::narrow_from_decl (this->ctx_->node ());
@@ -268,22 +277,27 @@ int be_visitor_args_invoke_cs::visit_predefined_type (be_predefined_type *node)
*os << arg->local_name ();
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_OutputCDR::from_char (" << arg->local_name () << ")";
+ *os << "::ACE_OutputCDR::from_char ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_OutputCDR::from_wchar (" << arg->local_name () << ")";
+ *os << "::ACE_OutputCDR::from_wchar ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_OutputCDR::from_boolean (" << arg->local_name () << ")";
+ *os << "::ACE_OutputCDR::from_boolean ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_OutputCDR::from_octet (" << arg->local_name () << ")";
+ *os << "::ACE_OutputCDR::from_octet ("
+ << arg->local_name () << ")";
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_predefined_type - "
- "Bad predefined type\n"),
+ ACE_TEXT ("be_visitor_")
+ ACE_TEXT ("args_invoke_cs::")
+ ACE_TEXT ("visit_predefined_type - ")
+ ACE_TEXT ("Bad predefined type\n")),
-1);
}
break;
@@ -315,22 +329,28 @@ int be_visitor_args_invoke_cs::visit_predefined_type (be_predefined_type *node)
*os << arg->local_name ();
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_InputCDR::to_char (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_char ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_InputCDR::to_wchar (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_wchar ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_InputCDR::to_boolean (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_boolean ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_InputCDR::to_octet (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_octet ("
+ << arg->local_name () << ")";
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_rettype_compiled_marshal_cs::"
- "visit_array - "
- "Bad predefined type\n"),
+ ACE_TEXT ("be_visitor_operation_")
+ ACE_TEXT ("rettype_compiled_")
+ ACE_TEXT ("marshal_cs::")
+ ACE_TEXT ("visit_array - ")
+ ACE_TEXT ("Bad predefined type\n")),
-1);
}
break;
@@ -356,22 +376,27 @@ int be_visitor_args_invoke_cs::visit_predefined_type (be_predefined_type *node)
*os << arg->local_name ();
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_InputCDR::to_char (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_char ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_InputCDR::to_wchar (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_wchar ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_InputCDR::to_boolean (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_boolean ("
+ << arg->local_name () << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_InputCDR::to_octet (" << arg->local_name () << ")";
+ *os << "::ACE_InputCDR::to_octet ("
+ << arg->local_name () << ")";
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_array - "
- "Bad predefined type\n"),
+ ACE_TEXT ("be_visitor_")
+ ACE_TEXT ("args_invoke_cs::")
+ ACE_TEXT ("visit_array - ")
+ ACE_TEXT ("Bad predefined type\n")),
-1);
}
break;
@@ -380,12 +405,12 @@ int be_visitor_args_invoke_cs::visit_predefined_type (be_predefined_type *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_array - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_array - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
-
+*/
return 0;
}
@@ -424,9 +449,9 @@ int be_visitor_args_invoke_cs::visit_sequence (be_sequence *)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_interface - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
@@ -508,9 +533,9 @@ int be_visitor_args_invoke_cs::visit_string (be_string *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_interface - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
@@ -534,9 +559,10 @@ int be_visitor_args_invoke_cs::visit_typedef (be_typedef *node)
if (node->primitive_base_type ()->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "visit_typedef - "
- "accept on primitive type failed\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("visit_typedef - ")
+ ACE_TEXT ("accept on primitive ")
+ ACE_TEXT ("type failed\n")),
-1);
}
@@ -620,9 +646,9 @@ int be_visitor_args_invoke_cs::emit_common (void)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "emit_common - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("emit_common - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
@@ -667,9 +693,9 @@ int be_visitor_args_invoke_cs::emit_common2 (be_type *node)
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_invoke_cs::"
- "emit_common2 - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_invoke_cs::")
+ ACE_TEXT ("emit_common2 - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp
index cbe2eb7f952..165da606c0c 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp
@@ -29,7 +29,8 @@ be_visitor_args_marshal_ss::
{
}
-int be_visitor_args_marshal_ss::visit_argument (be_argument *node)
+int be_visitor_args_marshal_ss::visit_argument (
+ be_argument *node)
{
this->ctx_->node (node);
be_type *bt = be_type::narrow_from_decl (node->field_type ());
@@ -212,27 +213,32 @@ int be_visitor_args_marshal_ss::visit_enum (be_enum *)
return 0;
}
-int be_visitor_args_marshal_ss::visit_interface (be_interface *)
+int be_visitor_args_marshal_ss::visit_interface (
+ be_interface *)
{
return this->emit_common ();
}
-int be_visitor_args_marshal_ss::visit_interface_fwd (be_interface_fwd *)
+int be_visitor_args_marshal_ss::visit_interface_fwd (
+ be_interface_fwd *)
{
return this->emit_common ();
}
-int be_visitor_args_marshal_ss::visit_valuebox (be_valuebox *)
+int be_visitor_args_marshal_ss::visit_valuebox (
+ be_valuebox *)
{
return this->emit_common ();
}
-int be_visitor_args_marshal_ss::visit_valuetype (be_valuetype *)
+int be_visitor_args_marshal_ss::visit_valuetype (
+ be_valuetype *)
{
return this->emit_common ();
}
-int be_visitor_args_marshal_ss::visit_valuetype_fwd (be_valuetype_fwd *)
+int be_visitor_args_marshal_ss::visit_valuetype_fwd (
+ be_valuetype_fwd *)
{
return this->emit_common ();
}
@@ -241,6 +247,8 @@ int be_visitor_args_marshal_ss::visit_predefined_type (
be_predefined_type *node
)
{
+ int status = this->gen_pd_arg (node, false);
+/*
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
be_argument::narrow_from_decl (this->ctx_->node ());
@@ -259,16 +267,20 @@ int be_visitor_args_marshal_ss::visit_predefined_type (
*os << lname << ".out ()";
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_InputCDR::to_char (" << lname << ")";
+ *os << "::ACE_InputCDR::to_char ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_InputCDR::to_wchar (" << lname << ")";
+ *os << "::ACE_InputCDR::to_wchar ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_InputCDR::to_boolean (" << lname << ")";
+ *os << "::ACE_InputCDR::to_boolean ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_InputCDR::to_octet (" << lname << ")";
+ *os << "::ACE_InputCDR::to_octet ("
+ << lname << ")";
break;
default:
*os << lname;
@@ -294,16 +306,20 @@ int be_visitor_args_marshal_ss::visit_predefined_type (
*os << lname << ".in ()";
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_OutputCDR::from_char (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_char ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_OutputCDR::from_wchar (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_wchar ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_OutputCDR::from_boolean (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_boolean ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_OutputCDR::from_octet (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_octet ("
+ << lname << ")";
break;
default:
*os << lname;
@@ -321,16 +337,20 @@ int be_visitor_args_marshal_ss::visit_predefined_type (
*os << lname << ".in ()";
break;
case AST_PredefinedType::PT_char:
- *os << "::ACE_OutputCDR::from_char (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_char ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_wchar:
- *os << "::ACE_OutputCDR::from_wchar (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_wchar ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_boolean:
- *os << "::ACE_OutputCDR::from_boolean (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_boolean ("
+ << lname << ")";
break;
case AST_PredefinedType::PT_octet:
- *os << "::ACE_OutputCDR::from_octet (" << lname << ")";
+ *os << "::ACE_OutputCDR::from_octet ("
+ << lname << ")";
break;
default:
*os << lname;
@@ -342,12 +362,12 @@ int be_visitor_args_marshal_ss::visit_predefined_type (
else
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_marshal_ss::"
- "visit_array - "
- "Bad substate\n"),
+ ACE_TEXT ("be_visitor_args_marshal_ss::")
+ ACE_TEXT ("visit_array - ")
+ ACE_TEXT ("Bad substate\n")),
-1);
}
-
+*/
return 0;
}
@@ -430,7 +450,8 @@ int be_visitor_args_marshal_ss::visit_string (be_string *node)
}
else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT)
{
- // we need to make a distinction between bounded and unbounded strings
+ // We need to make a distinction between
+ // bounded and unbounded strings.
if (bound == 0)
{
switch (this->direction ())
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
index 4a93ec0b6b9..e017dd26de1 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp
@@ -34,9 +34,9 @@ int be_visitor_args_upcall_ss::visit_argument (be_argument *node)
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_upcall_ss::"
- "visit_argument - "
- "Bad argument type\n"),
+ ACE_TEXT ("be_visitor_args_upcall_ss::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("Bad argument type\n")),
-1);
}
@@ -49,9 +49,9 @@ int be_visitor_args_upcall_ss::visit_argument (be_argument *node)
if (bt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_upcall_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
+ ACE_TEXT ("be_visitor_args_upcall_ss::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("cannot accept visitor\n")),
-1);
}
@@ -124,22 +124,26 @@ int be_visitor_args_upcall_ss::visit_enum (be_enum *)
return 0;
}
-int be_visitor_args_upcall_ss::visit_interface (be_interface *)
+int be_visitor_args_upcall_ss::visit_interface (
+ be_interface *)
{
return this->emit_common ();
}
-int be_visitor_args_upcall_ss::visit_interface_fwd (be_interface_fwd *)
+int be_visitor_args_upcall_ss::visit_interface_fwd (
+ be_interface_fwd *)
{
return this->emit_common ();
}
-int be_visitor_args_upcall_ss::visit_valuebox (be_valuebox *)
+int be_visitor_args_upcall_ss::visit_valuebox (
+ be_valuebox *)
{
return this->emit_common ();
}
-int be_visitor_args_upcall_ss::visit_valuetype (be_valuetype *)
+int be_visitor_args_upcall_ss::visit_valuetype (
+ be_valuetype *)
{
return this->emit_common ();
}
@@ -234,13 +238,14 @@ int be_visitor_args_upcall_ss::visit_predefined_type (
*os << arg->local_name ();
break;
- } // end switch direction
- } // end of else
+ }
+ }
return 0;
}
-int be_visitor_args_upcall_ss::visit_sequence (be_sequence *)
+int be_visitor_args_upcall_ss::visit_sequence (
+ be_sequence *)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -270,31 +275,36 @@ int be_visitor_args_upcall_ss::visit_sequence (be_sequence *)
return 0;
}
-int be_visitor_args_upcall_ss::visit_string (be_string *)
+int be_visitor_args_upcall_ss::visit_string (
+ be_string *)
{
return this->emit_common ();
}
-int be_visitor_args_upcall_ss::visit_structure (be_structure *node)
+int be_visitor_args_upcall_ss::visit_structure (
+ be_structure *node)
{
return this->emit_common2 (node);
}
-int be_visitor_args_upcall_ss::visit_union (be_union *node)
+int be_visitor_args_upcall_ss::visit_union (
+ be_union *node)
{
return this->emit_common2 (node);
}
-int be_visitor_args_upcall_ss::visit_typedef (be_typedef *node)
+int be_visitor_args_upcall_ss::visit_typedef (
+ be_typedef *node)
{
this->ctx_->alias (node);
if (node->primitive_base_type ()->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_upcall_ss::"
- "visit_typedef - "
- "accept on primitive type failed\n"),
+ ACE_TEXT ("be_visitor_args_upcall_ss::")
+ ACE_TEXT ("visit_typedef - ")
+ ACE_TEXT ("accept on primitive ")
+ ACE_TEXT ("type failed\n")),
-1);
}
@@ -383,7 +393,8 @@ int be_visitor_args_upcall_ss::emit_common (void)
return 0;
}
-int be_visitor_args_upcall_ss::emit_common2 (be_type *node)
+int be_visitor_args_upcall_ss::emit_common2 (
+ be_type *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp
index be333c10fa7..3d86a797222 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp
@@ -28,7 +28,8 @@ be_visitor_args_vardecl_ss::~be_visitor_args_vardecl_ss (void)
{
}
-int be_visitor_args_vardecl_ss::visit_argument (be_argument *node)
+int be_visitor_args_vardecl_ss::visit_argument (
+ be_argument *node)
{
this->ctx_->node (node);
be_type *bt = be_type::narrow_from_decl (node->field_type ());
@@ -36,9 +37,9 @@ int be_visitor_args_vardecl_ss::visit_argument (be_argument *node)
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_vardecl_ss::"
- "visit_argument - "
- "Bad argument type\n"),
+ ACE_TEXT ("be_visitor_args_vardecl_ss::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("Bad argument type\n")),
-1);
}
@@ -51,16 +52,17 @@ int be_visitor_args_vardecl_ss::visit_argument (be_argument *node)
if (bt->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_vardecl_ss::"
- "visit_argument - "
- "cannot accept visitor\n"),
+ ACE_TEXT ("be_visitor_args_vardecl_ss::")
+ ACE_TEXT ("visit_argument - ")
+ ACE_TEXT ("cannot accept visitor\n")),
-1);
}
return 0;
}
-int be_visitor_args_vardecl_ss::visit_array (be_array *node)
+int be_visitor_args_vardecl_ss::visit_array (
+ be_array *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -80,9 +82,11 @@ int be_visitor_args_vardecl_ss::visit_array (be_array *node)
{
case AST_Argument::dir_IN:
case AST_Argument::dir_INOUT:
- *os << "::" << bt->name () << " " << arg->local_name () << ";" << be_nl
+ *os << "::" << bt->name () << " "
+ << arg->local_name () << ";" << be_nl
<< "::" << bt->name () << "_forany _tao_forany_"
- << arg->local_name () << " (" << be_idt << be_idt_nl
+ << arg->local_name () << " ("
+ << be_idt << be_idt_nl
<< arg->local_name () << be_uidt_nl
<< ");" << be_uidt;
@@ -90,7 +94,8 @@ int be_visitor_args_vardecl_ss::visit_array (be_array *node)
case AST_Argument::dir_OUT:
if (node->size_type () == be_type::VARIABLE)
{
- *os << "::" << bt->name () << "_var " << arg->local_name ()
+ *os << "::" << bt->name ()
+ << "_var " << arg->local_name ()
<< ";";
}
else
@@ -126,7 +131,8 @@ int be_visitor_args_vardecl_ss::visit_enum (be_enum *node)
case AST_Argument::dir_IN:
case AST_Argument::dir_INOUT:
case AST_Argument::dir_OUT:
- *os << "::" << bt->name () << " " << arg->local_name () << ";";
+ *os << "::" << bt->name ()
+ << " " << arg->local_name () << ";";
break;
}
@@ -134,33 +140,39 @@ int be_visitor_args_vardecl_ss::visit_enum (be_enum *node)
return 0;
}
-int be_visitor_args_vardecl_ss::visit_interface (be_interface *node)
+int be_visitor_args_vardecl_ss::visit_interface (
+ be_interface *node)
{
return this->emit_common (node);
}
-int be_visitor_args_vardecl_ss::visit_interface_fwd (be_interface_fwd *node)
+int be_visitor_args_vardecl_ss::visit_interface_fwd (
+ be_interface_fwd *node)
{
return this->emit_common (node);
}
-int be_visitor_args_vardecl_ss::visit_valuebox (be_valuebox *node)
+int be_visitor_args_vardecl_ss::visit_valuebox (
+ be_valuebox *node)
{
return this->emit_common (node);
}
-int be_visitor_args_vardecl_ss::visit_valuetype (be_valuetype *node)
+int be_visitor_args_vardecl_ss::visit_valuetype (
+ be_valuetype *node)
{
return this->emit_common (node);
}
-int be_visitor_args_vardecl_ss::visit_valuetype_fwd (be_valuetype_fwd *node)
+int be_visitor_args_vardecl_ss::visit_valuetype_fwd (
+ be_valuetype_fwd *node)
{
return this->emit_common (node);
}
-int be_visitor_args_vardecl_ss::visit_predefined_type (be_predefined_type *node)
+int be_visitor_args_vardecl_ss::visit_predefined_type (
+ be_predefined_type *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -246,7 +258,8 @@ int be_visitor_args_vardecl_ss::visit_predefined_type (be_predefined_type *node)
return 0;
}
-int be_visitor_args_vardecl_ss::visit_sequence (be_sequence *node)
+int be_visitor_args_vardecl_ss::visit_sequence (
+ be_sequence *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -266,7 +279,8 @@ int be_visitor_args_vardecl_ss::visit_sequence (be_sequence *node)
{
case AST_Argument::dir_IN:
case AST_Argument::dir_INOUT:
- *os << "::" << bt->name () << " " << arg->local_name () << ";";
+ *os << "::" << bt->name () << " "
+ << arg->local_name () << ";";
break;
case AST_Argument::dir_OUT:
@@ -279,7 +293,8 @@ int be_visitor_args_vardecl_ss::visit_sequence (be_sequence *node)
return 0;
}
-int be_visitor_args_vardecl_ss::visit_string (be_string *node)
+int be_visitor_args_vardecl_ss::visit_string (
+ be_string *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -291,22 +306,26 @@ int be_visitor_args_vardecl_ss::visit_string (be_string *node)
case AST_Argument::dir_INOUT:
if (node->width () == (long) sizeof (char))
{
- *os << "::CORBA::String_var " << arg->local_name () << ";";
+ *os << "::CORBA::String_var "
+ << arg->local_name () << ";";
}
else
{
- *os << "::CORBA::WString_var " << arg->local_name () << ";";
+ *os << "::CORBA::WString_var "
+ << arg->local_name () << ";";
}
break;
case AST_Argument::dir_OUT:
if (node->width () == (long )sizeof (char))
{
- *os << "::CORBA::String_var " << arg->local_name () << ";";
+ *os << "::CORBA::String_var "
+ << arg->local_name () << ";";
}
else
{
- *os << "::CORBA::WString_var " << arg->local_name () << ";";
+ *os << "::CORBA::WString_var "
+ << arg->local_name () << ";";
}
break;
@@ -315,26 +334,30 @@ int be_visitor_args_vardecl_ss::visit_string (be_string *node)
return 0;
}
-int be_visitor_args_vardecl_ss::visit_structure (be_structure *node)
+int be_visitor_args_vardecl_ss::visit_structure (
+ be_structure *node)
{
return this->emit_common2 (node);
}
-int be_visitor_args_vardecl_ss::visit_union (be_union *node)
+int be_visitor_args_vardecl_ss::visit_union (
+ be_union *node)
{
return this->emit_common2 (node);
}
-int be_visitor_args_vardecl_ss::visit_typedef (be_typedef *node)
+int be_visitor_args_vardecl_ss::visit_typedef (
+ be_typedef *node)
{
this->ctx_->alias (node);
if (node->primitive_base_type ()->accept (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_vardecl_ss::"
- "visit_typedef - "
- "accept on primitive type failed\n"),
+ ACE_TEXT ("be_visitor_args_vardecl_ss::")
+ ACE_TEXT ("visit_typedef - ")
+ ACE_TEXT ("accept on primitive ")
+ ACE_TEXT ("type failed\n")),
-1);
}
@@ -376,7 +399,8 @@ be_visitor_args_vardecl_ss::visit_eventtype_fwd (
int
-be_visitor_args_vardecl_ss::emit_common (be_type *node)
+be_visitor_args_vardecl_ss::emit_common (
+ be_type *node)
{
TAO_OutStream *os = this->ctx_->stream ();
be_argument *arg =
@@ -396,7 +420,8 @@ be_visitor_args_vardecl_ss::emit_common (be_type *node)
{
case AST_Argument::dir_IN:
case AST_Argument::dir_INOUT:
- *os << "::" << bt->name () << "_var " << arg->local_name () << ";";
+ *os << "::" << bt->name () << "_var "
+ << arg->local_name () << ";";
break;
case AST_Argument::dir_OUT:
@@ -432,8 +457,8 @@ be_visitor_args_vardecl_ss::emit_common2 (be_type *node)
{
case AST_Argument::dir_IN:
case AST_Argument::dir_INOUT:
- *os << "::" << bt->name () << " " << arg->local_name () << ";";
-
+ *os << "::" << bt->name () << " "
+ << arg->local_name () << ";";
break;
case AST_Argument::dir_OUT:
if (node->size_type () == be_type::VARIABLE)
@@ -443,7 +468,8 @@ be_visitor_args_vardecl_ss::emit_common2 (be_type *node)
}
else
{
- *os << "::" << bt->name () << " " << arg->local_name () << ";";
+ *os << "::" << bt->name () << " "
+ << arg->local_name () << ";";
}
break;
diff --git a/TAO/TAO_IDL/be/be_visitor_component.cpp b/TAO/TAO_IDL/be/be_visitor_component.cpp
index 2dd629dd514..431d788a5a4 100644
--- a/TAO/TAO_IDL/be/be_visitor_component.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component.cpp
@@ -54,9 +54,6 @@
#include "be_extern.h"
#include "be_visitor_component/component.cpp"
-#include "be_visitor_component/component_ch.cpp"
-#include "be_visitor_component/component_ci.cpp"
-#include "be_visitor_component/component_cs.cpp"
#include "be_visitor_component/component_sh.cpp"
#include "be_visitor_component/component_si.cpp"
#include "be_visitor_component/component_ss.cpp"
@@ -79,8 +76,4 @@
#include "be_visitor_component/component_exs.cpp"
#include "be_visitor_component/facet_exs.cpp"
#include "be_visitor_component/executor_exs.cpp"
-#include "be_visitor_component/any_op_ch.cpp"
-#include "be_visitor_component/any_op_cs.cpp"
-#include "be_visitor_component/cdr_op_ch.cpp"
-#include "be_visitor_component/cdr_op_cs.cpp"
diff --git a/TAO/TAO_IDL/be/be_visitor_component/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/any_op_ch.cpp
deleted file mode 100644
index bd4c141cf49..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/any_op_ch.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-
-//=============================================================================
-/**
- * @file any_op_ch.cpp
- *
- * $Id$
- *
- * Visitor generating code for Any operators for an Component in the client
- * header.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-
-// ***************************************************************************
-// Interface visitor for generating Any operator declarations in the client header
-// ***************************************************************************
-
-be_visitor_component_any_op_ch::be_visitor_component_any_op_ch
-(be_visitor_context *ctx)
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_any_op_ch::~be_visitor_component_any_op_ch (void)
-{
-}
-
-int
-be_visitor_component_any_op_ch::visit_component (be_component *node)
-{
- be_visitor_context ctx (*this->ctx_);
- be_visitor_interface_any_op_ch visitor (&ctx);
- return visitor.visit_interface (node);
-}
-
-int
-be_visitor_component_any_op_ch::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_component/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_component/any_op_cs.cpp
deleted file mode 100644
index 1c32fe52ac0..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/any_op_cs.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO IDL
-//
-// = FILENAME
-// any_op_cs.cpp
-//
-// = DESCRIPTION
-// Visitor generating code for Any operators for Component in the stubs
-// file.
-//
-// = AUTHOR
-// Jeff Parsons
-//
-// ============================================================================
-
-// ***************************************************************************
-// Interface visitor for generating Any operator declarations in the client
-// stubs file
-// ***************************************************************************
-
-be_visitor_component_any_op_cs::be_visitor_component_any_op_cs (
- be_visitor_context *ctx
- )
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_any_op_cs::~be_visitor_component_any_op_cs (void)
-{
-}
-
-int
-be_visitor_component_any_op_cs::visit_component (be_component *node)
-{
- be_visitor_context ctx (*this->ctx_);
- be_visitor_interface_any_op_cs visitor (&ctx);
- return visitor.visit_interface (node);
-}
-
-int
-be_visitor_component_any_op_cs::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_component/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/cdr_op_ch.cpp
deleted file mode 100644
index ce9876e004a..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/cdr_op_ch.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-
-//=============================================================================
-/**
- * @file cdr_op_ch.cpp
- *
- * $Id$
- *
- * Visitor generating code for CDR operators for components. This uses
- * compiled marshaling.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-// ***************************************************************************
-// Interface visitor for generating CDR operator declarations in the client header
-// ***************************************************************************
-
-be_visitor_component_cdr_op_ch::be_visitor_component_cdr_op_ch (
- be_visitor_context *ctx
- )
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_cdr_op_ch::~be_visitor_component_cdr_op_ch (void)
-{
-}
-
-int
-be_visitor_component_cdr_op_ch::visit_component (be_component *node)
-{
- be_visitor_context ctx (*this->ctx_);
- be_visitor_interface_cdr_op_ch visitor (&ctx);
- return visitor.visit_interface (node);
-}
-
-int
-be_visitor_component_cdr_op_ch::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_component/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_component/cdr_op_cs.cpp
deleted file mode 100644
index b43bf3e0d12..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/cdr_op_cs.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-
-//=============================================================================
-/**
- * @file cdr_op_cs.cpp
- *
- * $Id$
- *
- * Visitor generating code for CDR operators for components
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-be_visitor_component_cdr_op_cs::be_visitor_component_cdr_op_cs (
- be_visitor_context *ctx
- )
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_cdr_op_cs::~be_visitor_component_cdr_op_cs (void)
-{
-}
-
-int
-be_visitor_component_cdr_op_cs::visit_component (be_component *node)
-{
- be_visitor_context ctx (*this->ctx_);
- be_visitor_interface_cdr_op_cs visitor (&ctx);
- return visitor.visit_interface (node);
-}
-
-int
-be_visitor_component_cdr_op_cs::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
deleted file mode 100644
index ffb4ec7b262..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-
-//=============================================================================
-/**
- * @file component_ch.cpp
- *
- * $Id$
- *
- * Visitor generating code for Components in the client header.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-// ******************************************************
-// Component visitor for client header
-// ******************************************************
-
-be_visitor_component_ch::be_visitor_component_ch (be_visitor_context *ctx)
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_ch::~be_visitor_component_ch (void)
-{
-}
-
-int
-be_visitor_component_ch::visit_component (be_component *node)
-{
- if (node->cli_hdr_gen () || node->imported ())
- {
- return 0;
- }
-
- // This will be a no-op if it has already been done by a forward
- // declaration.
- node->gen_var_out_seq_decls ();
-
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- if (!node->is_local () && !node->is_abstract ())
- {
- // Forward class declarations.
- *os << be_nl << be_nl
- << "class " << node->base_proxy_impl_name () << ";" << be_nl
- << "class " << node->remote_proxy_impl_name () << ";" << be_nl
- << "class " << node->base_proxy_broker_name () << ";" << be_nl
- << "class " << node->remote_proxy_broker_name () << ";"
- << be_nl << be_nl;
- }
-
- // Now generate the class definition.
- *os << "class " << be_global->stub_export_macro ()
- << " " << node->local_name () << be_idt_nl
- << ": public virtual ::" ;
-
- AST_Component *parent = node->base_component ();
-
- if (parent != 0)
- {
- *os << parent->name ();
- }
- else
- {
- *os << "Components::CCMObject";
- }
-
- long nsupports = node->n_inherits ();
-
- if (nsupports > 0)
- {
- *os << be_idt;
-
- for (long i = 0; i < nsupports; ++i)
- {
- *os << ", " << be_nl
- << "public virtual ::" << node->supports()[i]->name ();
- }
-
- *os << be_uidt;
- }
-
- *os << be_uidt_nl
- << "{" << be_nl
- << "public:" << be_idt_nl
-
- << "friend class TAO::Narrow_Utils<"
- << node->local_name () << ">;" << be_nl
-
- // Generate the _ptr_type and _var_type typedefs.
- << "typedef " << node->local_name () << "_ptr _ptr_type;"
- << be_nl
- << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;"
- << be_nl;
-
- // Generate the static _duplicate, _narrow, and _nil operations.
- *os << "// The static operations." << be_nl
- << "static " << node->local_name () << "_ptr " << "_duplicate ("
- << node->local_name () << "_ptr obj);" << be_nl << be_nl
- << "static " << node->local_name () << "_ptr "
- << "_narrow (::CORBA::Object_ptr obj);" << be_nl;
-
- // This method is defined in the header file to workaround old
- // g++ problems.
- *os << "static " << node->local_name () << "_ptr _nil (void)"
- << be_idt_nl << "{" << be_idt_nl
- << "return static_cast<" << node->local_name ()
- << "_ptr> (0);" << be_uidt_nl
- << "}" << be_uidt_nl << be_nl;
-
- if (be_global->any_support ())
- {
- *os << "static void _tao_any_destructor (void *);";
- }
-
- // Generate code for the interface definition by traversing thru the
- // elements of its scope. We depend on the front-end to have made sure
- // that only legal syntactic elements appear in our scope.
-
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_component_ch::"
- "visit_component - "
- "codegen for scope failed\n"),
- -1);
- }
-
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- if (! node->is_abstract ())
- {
- node->analyze_parentage ();
- }
-
- // If we inherit from both CORBA::Object and CORBA::AbstractBase,
- // we have to override _add_ref() to avoid ambiguity. A component
- // can have mixed parentage if it supports an abstract or mixed-
- // parentage interface.
- if (node->has_mixed_parentage ())
- {
- *os << be_nl << be_nl
- << "virtual void _add_ref (void);";
- }
-
- *os << be_nl << be_nl
- << "virtual ::CORBA::Boolean _is_a (const char *type_id);";
-
- // The _interface_repository_id method.
- *os << be_nl << be_nl
- << "virtual const char* _interface_repository_id (void) const;";
-
- // The virtual marshal method, to prevent marshal of local iterfaces.
- *os << be_nl << "virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr);";
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- // Add the Proxy Broker member variable.
- *os << be_uidt_nl << be_nl
- << "private:" << be_idt_nl
- << "TAO::Collocation_Proxy_Broker *"
- << "the" << node->base_proxy_broker_name ()
- << "_;";
- }
-
- *os << be_uidt_nl << be_nl
- << "protected:" << be_idt;
-
- // Generate the "protected" constructor so that users cannot
- // instantiate us.
-
- *os << be_nl
- << node->local_name () << " (void);";
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- *os << be_nl << be_nl
- << "/// This method traverse the inheritance tree and sets the"
- << be_nl
- << "/// parents piece of the given class in the right mode."
- << be_nl
- << "virtual void " << node->flat_name ()
- << "_setup_collocation (void);";
- }
-
- *os << be_nl << be_nl
- << node->local_name () << " (::IOP::IOR *ior, TAO_ORB_Core *orb_core);";
-
- *os << be_nl << be_nl
- << node->local_name ()
- << " (" << be_idt << be_idt_nl << "TAO_Stub *objref, " << be_nl
- << "::CORBA::Boolean _tao_collocated = false," << be_nl
- << "TAO_Abstract_ServantBase *servant = 0," << be_nl
- << "TAO_ORB_Core *oc = 0);" << be_uidt << be_uidt;
-
- // Friends declarations.
- *os << be_nl << be_nl
- << "friend class " << node->remote_proxy_impl_name () << ";"
- << be_nl
- << "friend class " << node->direct_proxy_impl_name () << ";";
-
- // Protected destructor.
- *os << be_nl << be_nl
- << "virtual ~" << node->local_name () << " (void);";
-
- // Private copy constructor and assignment operator. These are not
- // allowed, hence they are private.
- *os << be_uidt_nl << be_nl
- << "private:" << be_idt_nl;
- *os << node->local_name () << " (const "
- << node->local_name () << " &);"
- << be_nl
- << "void operator= (const " << node->local_name () << " &);";
-
- *os << be_uidt_nl
- << "};" << be_nl << be_nl;
-
- // List that generates proxy broker factory function pointer.
- be_global->non_local_interfaces.enqueue_tail (node);
-
- be_visitor_context ctx (*this->ctx_);
- if (be_global->gen_smart_proxies ())
- {
- *os << be_nl << be_nl;
- // Smart Proxy related classes.
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CH);
- be_visitor_interface_smart_proxy_ch sp_visitor (&ctx);
-
- if (node->accept (&sp_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_component_ch::"
- "visit_component - "
- "codegen for smart proxy classes failed\n"),
- -1);
- }
- }
-
- if (be_global->tc_support ())
- {
- be_visitor_typecode_decl td_visitor (&ctx);
-
- if (node->accept (&td_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_component_ch::"
- "visit_component - "
- "TypeCode declaration failed\n"),
- -1);
- }
- }
-
- node->cli_hdr_gen (true);
- return 0;
-}
-
-int
-be_visitor_component_ch::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
-
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ci.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ci.cpp
deleted file mode 100644
index e45e02f91d0..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/component_ci.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-
-//=============================================================================
-/**
- * @file component_ci.cpp
- *
- * $Id$
- *
- * Visitor generating code for Components in the client inline.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-// ******************************************************
-// Component visitor for client inline
-// ******************************************************
-
-be_visitor_component_ci::be_visitor_component_ci (be_visitor_context *ctx)
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_ci::~be_visitor_component_ci (void)
-{
-}
-
-int
-be_visitor_component_ci::visit_component (be_component *node)
-{
- if (node->imported () || node->cli_inline_gen ())
- {
- return 0;
- }
-
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl;
-
- // Generate the constructor from stub and servant.
- node->gen_stub_ctor (os);
-
- *os << be_nl << be_nl
- << "ACE_INLINE" << be_nl;
- *os << node->name () << "::"
- << node->local_name () << " ("
- << be_idt << be_idt_nl
- << "::IOP::IOR *ior," << be_nl
- << "TAO_ORB_Core *oc)" << be_uidt_nl
- << ": ::CORBA::Object (ior, oc)" << be_uidt_nl
- << "{" << be_nl
- << "}" ;
-
- node->cli_inline_gen (true);
- return 0;
-}
-
-int
-be_visitor_component_ci::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
-
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp
deleted file mode 100644
index 3240ea15325..00000000000
--- a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp
+++ /dev/null
@@ -1,343 +0,0 @@
-
-//=============================================================================
-/**
- * @file component_cs.cpp
- *
- * $Id$
- *
- * Visitor generating code for Components in the client stub.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-// ******************************************************
-// Component visitor for client stub
-// ******************************************************
-
-be_visitor_component_cs::be_visitor_component_cs (be_visitor_context *ctx)
- : be_visitor_component (ctx)
-{
-}
-
-be_visitor_component_cs::~be_visitor_component_cs (void)
-{
-}
-
-int
-be_visitor_component_cs::visit_component (be_component *node)
-{
- if (node->cli_stub_gen () || node->imported ())
- {
- return 0;
- }
-
- be_type *bt = 0;
-
- // Set the right type.
- if (this->ctx_->alias ())
- {
- bt = this->ctx_->alias ();
- }
- else
- {
- bt = node;
- }
-
- TAO_OutStream *os = this->ctx_->stream ();
-
- *os << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- if (node->is_defined ())
- {
- *os << be_nl << be_nl
- << "// Traits specializations for " << node->name () << ".";
-
- *os << be_nl << be_nl
- << node->name () << "_ptr" << be_nl
- << "TAO::Objref_Traits<" << node->name () << ">::duplicate ("
- << be_idt << be_idt_nl
- << node->name () << "_ptr p)" << be_uidt
- << be_uidt_nl
- << "{" << be_idt_nl
- << "return " << node->name () << "::_duplicate (p);" << be_uidt_nl
- << "}";
-
- *os << be_nl << be_nl
- << "void" << be_nl
- << "TAO::Objref_Traits<" << node->name () << ">::release ("
- << be_idt << be_idt_nl
- << node->name () << "_ptr p)" << be_uidt
- << be_uidt_nl
- << "{" << be_idt_nl
- << "::CORBA::release (p);" << be_uidt_nl
- << "}";
-
- *os << be_nl << be_nl
- << node->name () << "_ptr" << be_nl
- << "TAO::Objref_Traits<" << node->name () << ">::nil (void)"
- << be_nl
- << "{" << be_idt_nl
- << "return " << node->name () << "::_nil ();" << be_uidt_nl
- << "}";
-
- *os << be_nl << be_nl
- << "::CORBA::Boolean" << be_nl
- << "TAO::Objref_Traits<" << node->name () << ">::marshal ("
- << be_idt << be_idt_nl
- << "const " << node->name () << "_ptr p," << be_nl
- << "TAO_OutputCDR & cdr)" << be_uidt
- << be_uidt_nl
- << "{" << be_idt_nl
- << "return cdr << p;" << be_uidt_nl
- << "}";
- }
-
- if (node->has_mixed_parentage ())
- {
- *os << be_nl << be_nl
- << "void" << be_nl
- << "CORBA::release ("
- << node->name ()
- << "_ptr p)" << be_nl
- << "{" << be_idt_nl
- << "::CORBA::AbstractBase_ptr abs = p;" << be_nl
- << "::CORBA::release (abs);" << be_uidt_nl
- << "}";
-
- *os << be_nl << be_nl
- << "::CORBA::Boolean" << be_nl
- << "CORBA::is_nil ("
- << node->name ()
- << "_ptr p)" << be_nl
- << "{" << be_idt_nl
- << "::CORBA::Object_ptr obj = p;" << be_nl
- << "return ::CORBA::is_nil (obj);" << be_uidt_nl
- << "}";
- }
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- // 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) = 0;" << be_uidt << be_uidt;
- }
-
- // Generate the destructor and default constructor.
- *os << be_nl << be_nl
- << node->name () << "::~" << node->local_name ()
- << " (void)" << be_nl;
- *os << "{}" << be_nl << be_nl;
-
- *os << node->name () << "::" << node->local_name ()
- << " (void)" << be_nl
- << "{" << be_idt_nl;
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- *os << "this->" << node->flat_name ()
- << "_setup_collocation ();" << be_uidt_nl;
- }
-
- *os << be_uidt << "}" << be_nl << be_nl;
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- // Collocation setup method.
- *os << "void" << be_nl
- << node->name () << "::" << node->flat_name ()
- << "_setup_collocation (void)" << be_nl
- << "{" << be_idt_nl
- << "if ("<< "::" << node->flat_client_enclosing_scope ()
- << node->base_proxy_broker_name ()
- << "_Factory_function_pointer)" << be_idt_nl
- << "this->the" << node->base_proxy_broker_name ()
- << "_ =" << be_idt_nl
- << "::" << node->flat_client_enclosing_scope ()
- << node->base_proxy_broker_name ()
- << "_Factory_function_pointer (this);"
- << be_uidt << be_uidt_nl;
-
- AST_Component *base = node->base_component ();
-
- if (base != 0)
- {
- *os << be_nl
- << "this->" << base->flat_name ()
- << "_setup_collocation" << " ();";
- }
-
- *os << be_uidt_nl << "}" << be_nl << be_nl;
- }
-
- if (be_global->any_support ())
- {
- *os << "void " << be_nl
- << node->name ()
- << "::_tao_any_destructor (void *_tao_void_pointer)" << be_nl
- << "{" << be_idt_nl
- << node->local_name () << " *_tao_tmp_pointer = static_cast<"
- << node->local_name () << " *> (_tao_void_pointer);" << be_nl
- << "::CORBA::release (_tao_tmp_pointer);" << be_uidt_nl
- << "}" << be_nl << be_nl;
- }
-
- if (node->has_mixed_parentage ())
- {
- *os << "void" << be_nl
- << node->name () << "::_add_ref (void)" << be_nl
- << "{" << be_idt_nl
- << "this->::CORBA::Object::_add_ref ();"
- << be_uidt_nl
- << "}" << be_nl << be_nl;
- }
-
- // The _narrow method.
- *os << node->full_name () << "_ptr" << be_nl << node->full_name ()
- << "::_narrow (::CORBA::Object_ptr _tao_objref)" << be_nl
- << "{" << be_idt_nl;
-
- *os << "return" << be_idt_nl
- << "TAO::Narrow_Utils<"
- << node->local_name () << ">::narrow (";
-
- *os << be_idt << be_idt_nl
- << "_tao_objref," << be_nl
- << "\"" << node->repoID () << "\"," << be_nl;
-
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
- {
- *os << node->flat_client_enclosing_scope ()
- << node->base_proxy_broker_name ()
- << "_Factory_function_pointer" << be_uidt_nl;
- }
- else
- {
- *os << "0" << be_uidt_nl;
- }
-
- *os << ");" << be_uidt << be_uidt << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- // The _duplicate method
- *os << node->full_name () << "_ptr" << be_nl
- << node->full_name () << "::_duplicate ("
- << bt->nested_type_name (this->ctx_->scope ()->decl ())
- << "_ptr obj)" << be_nl
- << "{" << be_idt_nl
- << "if (! ::CORBA::is_nil (obj))" << be_idt_nl
- << "{" << be_idt_nl
- << "obj->_add_ref ();" << be_uidt_nl
- << "}" << be_uidt_nl << be_nl
- << "return obj;" << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- // The is_a method.
- *os << "::CORBA::Boolean" << be_nl
- << node->full_name () << "::_is_a (const char *value)" << be_nl
- << "{" << be_idt_nl
- << "if (" << be_idt << be_idt_nl;
-
- AST_Component *ancestor = node;
-
- while (ancestor != 0)
- {
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "value," << be_nl
- << "\"" << ancestor->repoID () << "\"" << be_uidt_nl
- << ") ||" << be_uidt_nl;
-
- ancestor = ancestor->base_component ();
- }
-
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "value," << be_nl
- << "\"IDL:omg.org/Components/CCMObject:1.0\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl
- << " )" << be_nl
- << "{" << be_idt_nl
- << "return true; // success using local knowledge" << be_uidt_nl
- << "}" << be_uidt_nl
- << "else" << be_idt_nl
- << "{" << be_idt_nl
- << "return this->::CORBA::Object::_is_a (value);" << be_uidt_nl
- << "}" << be_uidt << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- *os << "const char*" << be_nl
- << node->full_name ()
- << "::_interface_repository_id (void) const"
- << be_nl
- << "{" << be_idt_nl
- << "return \"" << node->repoID ()
- << "\";" << be_uidt_nl
- << "}";
-
- *os << be_nl << be_nl
- << "::CORBA::Boolean" << be_nl
- << node->name () << "::marshal (TAO_OutputCDR &cdr)" << be_nl
- << "{" << be_idt_nl
- << "return (cdr << this);" << be_uidt_nl
- << "}";
-
- // Generate code for the elements of the component.
- if (this->visit_scope (node) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_component_cs::"
- "visit_component - "
- "codegen for scope failed\n"),
- -1);
- }
-
- be_visitor_context ctx (*this->ctx_);
-
- // Smart Proxy classes.
- if (be_global->gen_smart_proxies ())
- {
- ctx.state (TAO_CodeGen::TAO_INTERFACE_SMART_PROXY_CS);
- be_visitor_interface_smart_proxy_cs isp_visitor (&ctx);
-
- if (node->accept (&isp_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_component_cs::"
- "visit_component - "
- "codegen for smart proxy classes failed\n"),
- -1);
- }
- }
-
- if (be_global->tc_support ())
- {
- // ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
- TAO::be_visitor_objref_typecode tc_visitor (&ctx);
-
- if (node->accept (&tc_visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_component_cs::"
- "visit_component - "
- "TypeCode definition failed\n"),
- -1);
- }
- }
-
- return 0;
-}
-
-int
-be_visitor_component_cs::visit_connector (be_connector *node)
-{
- return this->visit_component (node);
-}
-
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
index 02fa0ade88f..333b74e15a4 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp
@@ -52,9 +52,9 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_ch::"
- "visit_exception - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_exception_ch::")
+ ACE_TEXT ("visit_exception - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -75,7 +75,6 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
*os << "static void _tao_any_destructor (void *);" << be_nl << be_nl;
}
-
*os << "static " << node->local_name ()
<< " *_downcast ( ::CORBA::Exception *);" << be_nl
<< "static const " << node->local_name ()
@@ -100,9 +99,9 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception::"
- "visit_exception - "
- "codegen for ctor failed\n"),
+ ACE_TEXT ("be_visitor_exception::")
+ ACE_TEXT ("visit_exception - ")
+ ACE_TEXT ("codegen for ctor failed\n")),
-1);
}
}
@@ -123,9 +122,9 @@ int be_visitor_exception_ch::visit_exception (be_exception *node)
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_exception_ch::"
- "visit_exception - "
- "TypeCode declaration failed\n"),
+ ACE_TEXT ("be_visitor_exception_ch::")
+ ACE_TEXT ("visit_exception - ")
+ ACE_TEXT ("TypeCode declaration failed\n")),
-1);
}
}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface.cpp
index a6ae7d6e19c..6326664887f 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface.cpp
@@ -12,8 +12,15 @@
*/
//=============================================================================
+#include "ace/Auto_Ptr.h"
+
+#include "utl_identifier.h"
+#include "utl_exceptlist.h"
+#include "nr_extern.h"
+
#include "be_argument.h"
#include "be_interface.h"
+#include "be_mirror_port.h"
#include "be_attribute.h"
#include "be_constant.h"
#include "be_enum.h"
@@ -35,9 +42,6 @@
#include "be_extern.h"
#include "be_util.h"
#include "be_native.h"
-#include "utl_identifier.h"
-#include "utl_exceptlist.h"
-#include "nr_extern.h"
#include "be_visitor_interface.h"
#include "be_visitor_attribute.h"
@@ -53,7 +57,6 @@
#include "be_visitor_typecode.h"
#include "be_visitor_context.h"
#include "be_visitor_native.h"
-#include "ace/Auto_Ptr.h"
#include "be_visitor_interface/interface.cpp"
#include "be_visitor_interface/interface_ch.cpp"
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
index 303a04148c0..fb650d90879 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
// ***************************************************************************
// Interface visitor for generating Any operator declarations in the client header
// ***************************************************************************
@@ -41,8 +40,12 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node)
TAO_OutStream *os = this->ctx_->stream ();
const char *macro = this->ctx_->export_macro ();
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
+
+ *os << be_nl << be_nl;
be_module *module = 0;
@@ -104,9 +107,9 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_any_op_ch::"
- "visit_interface - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_interface_any_op_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -114,3 +117,18 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node)
node->cli_hdr_any_op_gen (1);
return 0;
}
+
+int
+be_visitor_interface_any_op_ch::visit_component (
+ be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_any_op_ch::visit_connector (
+ be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
index 0e9edb29206..da138ec967c 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
@@ -257,3 +257,18 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
node->cli_stub_any_op_gen (1);
return 0;
}
+
+int
+be_visitor_interface_any_op_cs::visit_component (
+ be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_any_op_cs::visit_connector (
+ be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
index 56f76a83e04..f7d0caed56e 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
// ***************************************************************************
// Interface visitor for generating CDR operator declarations in the client header
// ***************************************************************************
@@ -42,8 +41,12 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node)
TAO_OutStream *os = this->ctx_->stream ();
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl;
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
+
+ *os << be_nl;
*os << be_global->core_versioning_begin () << be_nl;
@@ -70,9 +73,9 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cdr_op_ch::"
- "visit_interface - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_interface_cdr_op_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -80,3 +83,18 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node)
node->cli_hdr_cdr_op_gen (1);
return 0;
}
+
+int
+be_visitor_interface_cdr_op_ch::visit_component (
+ be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_cdr_op_ch::visit_connector (
+ be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
index 20d93d00cdc..22d00a2ae0f 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
be_visitor_interface_cdr_op_cs::be_visitor_interface_cdr_op_cs (
be_visitor_context *ctx
)
@@ -156,3 +155,18 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node)
node->cli_stub_cdr_op_gen (1);
return 0;
}
+
+int
+be_visitor_interface_cdr_op_cs::visit_component (
+ be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_cdr_op_cs::visit_connector (
+ be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
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 e4f9335954e..a762a53655a 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
// ******************************************************
// Interface visitor for client header
// ******************************************************
@@ -39,123 +38,90 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
node->gen_var_out_seq_decls ();
TAO_OutStream *os = this->ctx_->stream ();
- long i;
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;
- // Now generate the class definition.
- *os << be_nl << be_nl
- << "class " << be_global->stub_export_macro ()
- << " " << node->local_name () << be_idt_nl
- << ": " ;
-
- long nparents = node->n_inherits ();
- int has_concrete_parent = 0;
-
- // If node interface inherits from other interfaces.
- if (nparents > 0)
- {
- *os << be_idt;
-
- for (i = 0; i < nparents; ++i)
- {
- if (! node->inherits ()[i]->is_abstract ())
- {
- has_concrete_parent = 1;
- }
-
- *os << "public virtual ::"
- << node->inherits ()[i]->name ();
-
- if (i < nparents - 1)
- {
- // Node has multiple inheritance, so put a comma.
- *os << "," << be_nl;
- }
- }
-
- if (has_concrete_parent == 1 || node->is_abstract ())
- {
- *os << be_uidt << be_uidt_nl;
- }
- else if (! node->is_abstract ())
- {
- *os << "," << be_nl;
- }
- }
+ AST_Component *c = AST_Component::narrow_from_decl (node);
- if (node->is_abstract () && nparents == 0)
+ if (c != 0)
{
- *os << "public virtual ::CORBA::AbstractBase" << be_uidt_nl;
+ // Forward class declarations for components.
+ *os << be_nl << be_nl
+ << "class " << node->base_proxy_impl_name ()
+ << ";" << be_nl
+ << "class " << node->remote_proxy_impl_name ()
+ << ";" << be_nl
+ << "class " << node->base_proxy_broker_name ()
+ << ";" << be_nl
+ << "class " << node->remote_proxy_broker_name ()
+ << ";";
}
- if (has_concrete_parent == 0 && ! node->is_abstract ())
- {
- *os << "public virtual ::CORBA::Object";
-
- if (nparents > 0)
- {
- *os << be_uidt;
- }
+ // Now generate the class definition.
+ *os << be_nl << be_nl
+ << "class " << be_global->stub_export_macro ()
+ << " " << node->local_name () << be_idt_nl
+ << ": ";
- *os << be_uidt_nl;
- }
+ node->gen_stub_inheritance (os);
// Generate the body.
- *os << "{" << be_nl
- << "public:" << be_idt_nl;
+ *os << be_nl
+ << "{" << be_nl
+ << "public:" << be_idt;
- if (!node->is_local () && !node->is_abstract ())
- {
- *os << "friend class TAO::Narrow_Utils<"
- << node->local_name () << ">;" << be_nl;
- }
- else if (!node->is_local () && node->is_abstract ())
+ if (!node->is_local ())
{
- *os << "friend class TAO::AbstractBase_Narrow_Utils<"
- << node->local_name () << ">;" << be_nl;
+ bool abs = node->is_abstract ();
+
+ *os << be_nl
+ << "friend class TAO::"
+ << (abs ? "AbstractBase_" : "") << "Narrow_Utils<"
+ << node->local_name () << ">;";
}
- *os << "typedef " << node->local_name () << "_ptr _ptr_type;"
- << be_nl
- << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;"
- << be_nl << be_nl;
+ node->gen_stub_decls (os);
// Generate the static _duplicate, _narrow, _unchecked_narrow and
// _nil operations.
- *os << "// The static operations." << be_nl
+ *os << be_nl << be_nl
+ << "// The static operations." << be_nl
<< "static " << node->local_name () << "_ptr " << "_duplicate ("
- << node->local_name () << "_ptr obj);" << be_nl << be_nl
- << "static void _tao_release ("
<< node->local_name () << "_ptr obj);" << be_nl << be_nl;
-
- if (this->gen_xxx_narrow ("_narrow",
- node,
- os) == false)
+
+ if (c == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Error in "
- "be_visitor_interface_ch::"
- "visit_interface while generating "
- "_narrow () declaration\n"),
- -1);
+ *os << "static void _tao_release ("
+ << node->local_name () << "_ptr obj);"
+ << be_nl << be_nl;
}
- if (this->gen_xxx_narrow ("_unchecked_narrow",
- node,
- os) == false)
+ if (! this->gen_xxx_narrow ("_narrow", node, os))
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Error in "
- "be_visitor_interface_ch::"
- "visit_interface while generating "
- "_unchecked_narrow () declaration\n"),
+ ACE_TEXT ("Error in ")
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface while generating ")
+ ACE_TEXT ("_narrow () declaration\n")),
-1);
}
+
+ if (c == 0)
+ {
+ if (! this->gen_xxx_narrow ("_unchecked_narrow", node, os))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Error in ")
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface while generating ")
+ ACE_TEXT ("_unchecked_narrow () declaration\n")),
+ -1);
+ }
+ }
// This method is defined in the header file to workaround old
// g++ problems.
@@ -164,16 +130,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
<< "{" << be_idt_nl
<< "return static_cast<" << node->local_name ()
<< "_ptr> (0);" << be_uidt_nl
- << "}" << be_nl << be_nl;
-
- bool gen_any_destructor =
- be_global->any_support ()
- && (!node->is_local () || be_global->gen_local_iface_anyops ());
-
- if (gen_any_destructor)
- {
- *os << "static void _tao_any_destructor (void *);";
- }
+ << "}";
// Generate code for the interface definition by traversing thru the
// elements of its scope. We depend on the front-end to have made sure
@@ -182,9 +139,9 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -193,15 +150,19 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
if (node->convert_parent_ops (this) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "converting parent ops failed\n"),
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("converting parent ops failed\n")),
-1);
}
}
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
+
+ *os << be_nl << be_nl;
// If we inherit from both CORBA::Object and CORBA::AbstractBase,
// we have to override _add_ref() to avoid ambiguity.
@@ -211,26 +172,30 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
}
// The _is_a method
- *os << "virtual ::CORBA::Boolean _is_a (const char *type_id);" << be_nl;
+ *os << "virtual ::CORBA::Boolean _is_a (const char *type_id);"
+ << be_nl;
// The _interface_repository_id method.
- *os << "virtual const char* _interface_repository_id (void) const;";
+ *os << "virtual const char* _interface_repository_id "
+ << "(void) const;";
// The virtual marshal method, to prevent marshal of local iterfaces.
*os << be_nl
- << "virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr);";
+ << "virtual ::CORBA::Boolean marshal "
+ << "(TAO_OutputCDR &cdr);";
- if (be_global->gen_ostream_operators ())
+ if (c == 0 && be_global->gen_ostream_operators ())
{
*os << be_nl
<< "virtual std::ostream &_tao_stream_v (std::ostream &) const;";
}
if (! node->is_local () &&
- (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ()))
+ (be_global->gen_direct_collocation()
+ || be_global->gen_thru_poa_collocation ()))
{
// Add the Proxy Broker member variable.
- *os << be_uidt_nl
+ *os << be_uidt_nl << be_nl
<< "private:" << be_idt_nl
<< "TAO::Collocation_Proxy_Broker *"
<< "the" << node->base_proxy_broker_name ()
@@ -295,12 +260,23 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
<< "TAO_Stub *objref," << be_nl
<< "::CORBA::Boolean _tao_collocated = false," << be_nl
<< "TAO_Abstract_ServantBase *servant = 0," << be_nl
- << "TAO_ORB_Core *orb_core = 0);" << be_uidt
- << be_uidt_nl << be_nl;
+ << "TAO_ORB_Core *orb_core = 0);"
+ << be_uidt << be_uidt;
+ }
+
+ if (c != 0)
+ {
+ // Friends declarations, component only.
+ *os << be_nl << be_nl
+ << "friend class " << node->remote_proxy_impl_name ()
+ << ";" << be_nl
+ << "friend class " << node->direct_proxy_impl_name ()
+ << ";";
}
// Protected destructor.
- *os << "virtual ~" << node->local_name () << " (void);";
+ *os << be_nl << be_nl
+ << "virtual ~" << node->local_name () << " (void);";
// Private copy constructor and assignment operator. These are not
// allowed, hence they are private.
@@ -317,15 +293,11 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
*os << "void operator= (const " << node->local_name () << " &);";
- // Generate the embedded RequestInfo classes per operation.
- // This is to be used by interceptors.
- be_visitor_context ctx (*this->ctx_);
-
- ctx = *this->ctx_;
-
- *os << be_uidt_nl;
- *os << "};";
+ *os << be_uidt_nl
+ << "};";
+ be_visitor_context ctx (*this->ctx_);
+
// Don't support smart proxies for local interfaces.
if (! node->is_local ())
{
@@ -343,9 +315,10 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
if (node->accept (&sp_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_ch::"
- "visit_interface - "
- "codegen for smart proxy classes failed\n"),
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for smart ")
+ ACE_TEXT ("proxy classes failed\n")),
-1);
}
}
@@ -358,9 +331,9 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
if (node->accept (&td_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_ch::"
- "visit_interface - "
- "TypeCode declaration failed\n"),
+ ACE_TEXT ("be_visitor_interface_ch::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("TypeCode declaration failed\n")),
-1);
}
}
@@ -370,6 +343,76 @@ be_visitor_interface_ch::visit_interface (be_interface *node)
}
int
+be_visitor_interface_ch::visit_component (be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_ch::visit_connector (be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_ch::visit_extended_port (be_extended_port *node)
+{
+ this->ctx_->port_prefix () = node->local_name ()->get_string ();
+ this->ctx_->port_prefix () += '_';
+
+ /// If the port visit traverses any attributes defined in the
+ /// original porttype, this is a way for visitors down the
+ /// line to tell what scope we are actually in.
+ this->ctx_->interface (
+ be_interface::narrow_from_scope (node->defined_in ()));
+
+ /// Will ignore everything but porttype attributes.
+ int status = this->visit_scope (node->port_type ());
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_interface_ch")
+ ACE_TEXT ("::visit_extended_port - ")
+ ACE_TEXT ("visit_scope failed\n")),
+ -1);
+ }
+
+ /// Reset port prefix string.
+ this->ctx_->port_prefix () = "";
+ return 0;
+}
+
+int
+be_visitor_interface_ch::visit_mirror_port (be_mirror_port *node)
+{
+ this->ctx_->port_prefix () = node->local_name ()->get_string ();
+ this->ctx_->port_prefix () += '_';
+
+ /// If the port visit traverses any attributes defined in the
+ /// original porttype, this is a way for visitors down the
+ /// line to tell what scope we are actually in.
+ this->ctx_->interface (
+ be_interface::narrow_from_scope (node->defined_in ()));
+
+ /// Will ignore everything but porttype attributes.
+ int status = this->visit_scope (node->port_type ());
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_interface_ch")
+ ACE_TEXT ("::visit_mirror_port - ")
+ ACE_TEXT ("visit_scope failed\n")),
+ -1);
+ }
+
+ /// Reset port prefix string.
+ this->ctx_->port_prefix () = "";
+ return 0;
+}
+
+int
be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node,
be_interface *base,
TAO_OutStream *os)
@@ -392,9 +435,9 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node,
if (d == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_interface::"
- "gen_abstract_ops_helper - "
- "bad node in this scope\n"),
+ ACE_TEXT ("be_interface::")
+ ACE_TEXT ("gen_abstract_ops_helper - ")
+ ACE_TEXT ("bad node in this scope\n")),
-1);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp
index 9f3fa20a1b8..209c80d5871 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp
@@ -96,9 +96,11 @@ be_visitor_interface_ci::visit_interface (be_interface *node)
<< "TAO_ORB_Core *oc)" << be_uidt_nl;
*os << ": ::CORBA::Object (ior, oc)" << be_idt_nl;
- if (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ())
+ if (be_global->gen_direct_collocation()
+ || be_global->gen_thru_poa_collocation ())
{
- *os << ", the"<< node->base_proxy_broker_name () << "_ (0)";
+ *os << ", the" << node->base_proxy_broker_name ()
+ << "_ (0)";
}
*os << be_uidt << be_uidt_nl
@@ -109,3 +111,16 @@ be_visitor_interface_ci::visit_interface (be_interface *node)
node->cli_inline_gen (true);
return 0;
}
+
+int
+be_visitor_interface_ci::visit_component (be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_ci::visit_connector (be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
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 ce006e3c67a..54ec024e262 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
// ************************************************************
// Interface visitor for client stubs
// ************************************************************
@@ -45,6 +44,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
bt = node;
}
+ AST_Component *c = AST_Component::narrow_from_decl (node);
TAO_OutStream *os = this->ctx_->stream ();
*os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
@@ -90,7 +90,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
<< "{" << be_idt_nl
<< "return ";
- if (node->is_abstract ())
+ if (node->is_abstract () || c != 0)
{
*os << "cdr << p;";
}
@@ -103,7 +103,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
<< "}";
}
- if (be_global->gen_ostream_operators ())
+ if (c == 0 && be_global->gen_ostream_operators ())
{
*os << be_nl << be_nl
<< "std::ostream &" << be_nl
@@ -158,9 +158,9 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -194,7 +194,8 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
}
if (! node->is_local () &&
- (be_global->gen_direct_collocation() || be_global->gen_thru_poa_collocation ()))
+ (be_global->gen_direct_collocation()
+ || be_global->gen_thru_poa_collocation ()))
{
*os << be_nl << be_nl
<< "void" << be_nl
@@ -242,28 +243,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
<< "}" << be_uidt;
// Now we setup the immediate parents.
- long n_parents = node->n_inherits ();
- bool has_parent = false;
-
- if (n_parents > 0)
- {
- for (long i = 0; i < n_parents; ++i)
- {
- be_interface *inherited =
- be_interface::narrow_from_decl (node->inherits ()[i]);
-
- if (has_parent == 0)
- {
- *os << be_nl;
- }
-
- has_parent = true;
-
- *os << be_nl
- << "this->" << inherited->flat_name ()
- << "_setup_collocation" << " ();";
- }
- }
+ node->gen_parent_collocation (os);
*os << be_uidt_nl << "}";
}
@@ -275,7 +255,8 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
bool gen_any_destructor =
be_global->any_support ()
- && (!node->is_local () || be_global->gen_local_iface_anyops ());
+ && (!node->is_local ()
+ || be_global->gen_local_iface_anyops ());
if (gen_any_destructor)
{
@@ -301,25 +282,23 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
}
// The _narrow method
- if (this->gen_xxx_narrow ("narrow",
- node) == false)
+ if (! this->gen_xxx_narrow ("narrow", node))
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "_narrow () method codegen failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("_narrow () method codegen failed\n")),
-1);
}
- // The _unchecked_narrow method
- if (this->gen_xxx_narrow ("unchecked_narrow",
- node) == false)
+ // The _unchecked_narrow method, not for components.
+ if (c == 0 && ! this->gen_xxx_narrow ("unchecked_narrow", node))
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "_unchecked_narrow () method codegen"
- " failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("_unchecked_narrow () method codegen")
+ ACE_TEXT (" failed\n")),
-1);
}
@@ -338,13 +317,16 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
<< "}" << be_nl << be_nl;
// The _tao_release method
- *os << "void" << be_nl
- << node->full_name () << "::_tao_release ("
- << bt->local_name ()
- << "_ptr obj)" << be_nl
- << "{" << be_idt_nl
- << "::CORBA::release (obj);" << be_uidt_nl
- << "}" << be_nl << be_nl;
+ if (c == 0)
+ {
+ *os << "void" << be_nl
+ << node->full_name () << "::_tao_release ("
+ << bt->local_name ()
+ << "_ptr obj)" << be_nl
+ << "{" << be_idt_nl
+ << "::CORBA::release (obj);" << be_uidt_nl
+ << "}" << be_nl << be_nl;
+ }
*os << "::CORBA::Boolean" << be_nl
<< node->full_name () << "::_is_a (const char *value)" << be_nl;
@@ -352,51 +334,17 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
*os << "{" << be_idt_nl
<< "if (" << be_idt << be_idt_nl;
- int const status =
- node->traverse_inheritance_graph (be_interface::is_a_helper,
- os);
-
+ int status = node->gen_is_a_ancestors (os);
+
if (status == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "_is_a method codegen failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("gen_is_a_ancestors() failed\n")),
-1);
}
-
- if (node->is_abstract () || node->has_mixed_parentage ())
- {
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "value," << be_nl
- << "\"IDL:omg.org/CORBA/AbstractBase:1.0\"" << be_uidt_nl
- << ")";
- }
- else if (node->is_local ())
- {
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "value," << be_nl
- << "\"IDL:omg.org/CORBA/LocalObject:1.0\"" << be_uidt_nl
- << ")";
- }
-
- if (node->has_mixed_parentage () || node->is_local ())
- {
- *os << " ||" << be_uidt_nl;
- }
- else if (node->is_abstract ())
- {
- *os << be_uidt << be_uidt_nl;
- }
-
- if (! node->is_abstract ())
- {
- *os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "value," << be_nl
- << "\"IDL:omg.org/CORBA/Object:1.0\"" << be_uidt_nl
- << ")" << be_uidt << be_uidt_nl;
- }
-
+
*os << ")" << be_nl
<< "{" << be_idt_nl
<< "return true; // success using local knowledge" << be_uidt_nl
@@ -425,22 +373,14 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
<< "}";
*os << be_nl << be_nl
- << "::CORBA::Boolean" << be_nl;
-
- if (node->is_local ())
- {
- *os << node->name () << "::marshal (TAO_OutputCDR &)" << be_nl
- << "{" << be_idt_nl
- << "return false;" << be_uidt_nl
- << "}";
- }
- else
- {
- *os << node->name () << "::marshal (TAO_OutputCDR &cdr)" << be_nl
- << "{" << be_idt_nl
- << "return (cdr << this);" << be_uidt_nl
- << "}";
- }
+ << "::CORBA::Boolean" << be_nl
+ << node->name () << "::marshal (TAO_OutputCDR &cdr)"
+ << be_nl
+ << "{" << be_idt_nl
+ << "return "
+ << (node->is_local () ? "false" : "(cdr << this)")
+ << ";" << be_uidt_nl
+ << "}";
if (! node->is_abstract ())
{
@@ -455,9 +395,10 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
if (node->accept (&isp_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_cs::"
- "visit_interface - "
- "codegen for smart proxy classes failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("codegen for smart ")
+ ACE_TEXT ("proxy classes failed\n")),
-1);
}
}
@@ -467,15 +408,14 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
{
be_visitor_context ctx = *this->ctx_;
- // ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
TAO::be_visitor_objref_typecode tc_visitor (&ctx);
if (node->accept (&tc_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface_cs::"
- "visit_interface - "
- "TypeCode definition failed\n"),
+ ACE_TEXT ("be_visitor_interface_cs::")
+ ACE_TEXT ("visit_interface - ")
+ ACE_TEXT ("TypeCode definition failed\n")),
-1);
}
}
@@ -582,6 +522,76 @@ be_visitor_interface_cs::gen_xxx_narrow (const char *pre,
}
int
+be_visitor_interface_cs::visit_component (be_component *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_cs::visit_connector (be_connector *node)
+{
+ return this->visit_interface (node);
+}
+
+int
+be_visitor_interface_cs::visit_extended_port (be_extended_port *node)
+{
+ this->ctx_->port_prefix () = node->local_name ()->get_string ();
+ this->ctx_->port_prefix () += '_';
+
+ /// If the port visit traverses any attributes defined in the
+ /// original porttype, this is a way for visitors down the
+ /// line to tell what scope we are actually in.
+ this->ctx_->interface (
+ be_interface::narrow_from_scope (node->defined_in ()));
+
+ /// Will ignore everything but porttype attributes.
+ int status = this->visit_scope (node->port_type ());
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_interface_ch")
+ ACE_TEXT ("::visit_extended_port - ")
+ ACE_TEXT ("visit_scope failed\n")),
+ -1);
+ }
+
+ /// Reset port prefix string.
+ this->ctx_->port_prefix () = "";
+ return 0;
+}
+
+int
+be_visitor_interface_cs::visit_mirror_port (be_mirror_port *node)
+{
+ this->ctx_->port_prefix () = node->local_name ()->get_string ();
+ this->ctx_->port_prefix () += '_';
+
+ /// If the port visit traverses any attributes defined in the
+ /// original porttype, this is a way for visitors down the
+ /// line to tell what scope we are actually in.
+ this->ctx_->interface (
+ be_interface::narrow_from_scope (node->defined_in ()));
+
+ /// Will ignore everything but porttype attributes.
+ int status = this->visit_scope (node->port_type ());
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_interface_ch")
+ ACE_TEXT ("::visit_mirror_port - ")
+ ACE_TEXT ("visit_scope failed\n")),
+ -1);
+ }
+
+ /// Reset port prefix string.
+ this->ctx_->port_prefix () = "";
+ return 0;
+}
+
+int
be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node,
be_interface *base,
TAO_OutStream *os)
diff --git a/TAO/TAO_IDL/be/be_visitor_module/module.cpp b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
index 75073b5e36b..f3e3c751599 100644
--- a/TAO/TAO_IDL/be/be_visitor_module/module.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
@@ -698,7 +698,7 @@ be_visitor_module::visit_component (be_component *node)
{
case TAO_CodeGen::TAO_ROOT_CH:
{
- be_visitor_component_ch visitor (&ctx);
+ be_visitor_interface_ch visitor (&ctx);
// So we can pick up the abstract ops helpers.
ctx.state (TAO_CodeGen::TAO_INTERFACE_CH);
status = node->accept (&visitor);
@@ -706,25 +706,25 @@ be_visitor_module::visit_component (be_component *node)
}
case TAO_CodeGen::TAO_ROOT_CI:
{
- be_visitor_component_ci visitor (&ctx);
+ be_visitor_interface_ci visitor (&ctx);
status = node->accept (&visitor);
break;
}
case TAO_CodeGen::TAO_ROOT_CS:
{
- be_visitor_component_cs visitor (&ctx);
+ be_visitor_interface_cs visitor (&ctx);
status = node->accept (&visitor);
break;
}
case TAO_CodeGen::TAO_ROOT_CDR_OP_CH:
{
- be_visitor_component_cdr_op_ch visitor (&ctx);
+ be_visitor_interface_cdr_op_ch visitor (&ctx);
status = node->accept (&visitor);
break;
}
case TAO_CodeGen::TAO_ROOT_CDR_OP_CS:
{
- be_visitor_component_cdr_op_cs visitor (&ctx);
+ be_visitor_interface_cdr_op_cs visitor (&ctx);
status = node->accept (&visitor);
break;
}
@@ -736,13 +736,13 @@ be_visitor_module::visit_component (be_component *node)
}
case TAO_CodeGen::TAO_ROOT_ANY_OP_CH:
{
- be_visitor_component_any_op_ch visitor (&ctx);
+ be_visitor_interface_any_op_ch visitor (&ctx);
status = node->accept (&visitor);
break;
}
case TAO_CodeGen::TAO_ROOT_ANY_OP_CS:
{
- be_visitor_component_any_op_cs visitor (&ctx);
+ be_visitor_interface_any_op_cs visitor (&ctx);
status = node->accept (&visitor);
break;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
index 1e2c5faf11f..5933502c8ef 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp
@@ -53,9 +53,9 @@ be_visitor_operation_ss::visit_operation (be_operation * node)
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "Bad return type\n"),
+ ACE_TEXT ("be_visitor_operation_ss::")
+ ACE_TEXT ("visit_operation - ")
+ ACE_TEXT ("Bad return type\n")),
-1);
}
@@ -127,17 +127,19 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node,
// We need the interface node in which this operation was
// defined. However, if this operation node was an attribute node
- // in disguise, we get this information from the context
- be_interface * const intf = this->ctx_->attribute ()
- ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ())
- : be_interface::narrow_from_scope (node->defined_in ());
-
- if (!intf)
+ // in disguise, we get this information from the context.
+ UTL_Scope *s = this->ctx_->attribute ()
+ ? this->ctx_->attribute ()->defined_in ()
+ : node->defined_in ();
+
+ be_interface *intf = be_interface::narrow_from_scope (s);
+
+ if (intf == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_ss::"
- "visit_operation - "
- "bad interface scope\n"),
+ ACE_TEXT ("be_visitor_operation_ss::")
+ ACE_TEXT ("visit_operation - ")
+ ACE_TEXT ("bad interface scope\n")),
-1);
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
index 1effa9a6ef6..08fb6b10dca 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
// ***************************************************************************
// Sequence visitor for generating Any operator declarations in the client header
// ***************************************************************************
@@ -32,7 +31,9 @@ int
be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node)
{
if (node->cli_hdr_any_op_gen ()
- || node->imported ())
+ || node->imported ()
+ || (node->is_local ()
+ && !be_global->gen_local_iface_anyops ()))
{
return 0;
}
@@ -40,8 +41,12 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node)
TAO_OutStream *os = this->ctx_->stream ();
const char *macro = this->ctx_->export_macro ();
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__;
+
+ *os << be_nl << be_nl;
ACE_CString name;
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
index 964b0fc01cc..fe8df12a2da 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
@@ -12,7 +12,6 @@
*/
//=============================================================================
-
// ***************************************************************************
// Sequence visitor for generating Any operator declarations in the client
// stubs file
@@ -33,7 +32,9 @@ int
be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
{
if (node->cli_stub_any_op_gen ()
- || node->imported ())
+ || node->imported ()
+ || (node->is_local ()
+ && !be_global->gen_local_iface_anyops ()))
{
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
index d000afaf3df..864fd4cde2a 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
@@ -34,9 +34,9 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
if (node->create_name (this->ctx_->tdef ()) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "failed creating name\n"),
+ ACE_TEXT ("be_visitor_sequence_ch::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("failed creating name\n")),
-1);
}
@@ -61,9 +61,9 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
if (bt == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Bad element type\n"),
+ ACE_TEXT ("be_visitor_sequence_ch::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("Bad element type\n")),
-1);
}
@@ -83,9 +83,10 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
if (bt->accept (this) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "codegen for anonymous base type failed\n"),
+ ACE_TEXT ("be_visitor_sequence_ch::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("codegen for anonymous ")
+ ACE_TEXT ("base type failed\n")),
-1);
}
@@ -93,7 +94,9 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
this->ctx_->tdef (tmp);
}
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;
@@ -140,7 +143,8 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
return 0;
}
- *os << "class " << be_global->stub_export_macro () << " "
+ *os << be_nl << be_nl
+ << "class " << be_global->stub_export_macro () << " "
<< node->local_name () << be_idt_nl
<< ": public" << be_idt << be_idt_nl;
@@ -152,9 +156,10 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
if (status == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_ch::"
- "visit_sequence - "
- "Base class name generation failed\n"),
+ ACE_TEXT ("be_visitor_sequence_ch::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("Base class name ")
+ ACE_TEXT ("generation failed\n")),
-1);
}
@@ -221,26 +226,10 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
<< be_nl << be_nl
<< "virtual ::CORBA::ULong maximum (void) const;";
}
+
+ *os << be_nl;
- if (be_global->any_support () && !node->anonymous ())
- {
- *os << be_nl << be_nl
- << "static void _tao_any_destructor (void *);";
- }
-
- /// If we are using std::vector, we can't implement this
- /// constructor.
- if (!be_global->alt_mapping () || !node->unbounded ())
- {
- // Generate the _var_type typedef (only if we are not anonymous).
- if (this->ctx_->tdef () != 0)
- {
- *os << be_nl << be_nl
- << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;";
- }
- }
+ node->gen_stub_decls (os);
// TAO provides extensions for octet sequences, first find out if
// the base type is an octet (or an alias for octet).
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
index 97576ea156f..2ca1b6ed917 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
@@ -59,14 +59,17 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
TAO_OutStream *os = this->ctx_->stream ();
- *os << be_nl << be_nl << "// TAO_IDL - Generated from " << be_nl
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from " << be_nl
<< "// "__FILE__ << ":" << __LINE__;
os->gen_ifdef_macro (node->flat_name ());
// default constructor
*os << be_nl << be_nl
- << node->name () << "::" << node->local_name () << " (void)" << be_nl
+ << node->name () << "::" << node->local_name ()
+ << " (void)" << be_nl
<< "{}";
// for unbounded sequences, we have a different set of constructors
@@ -123,9 +126,9 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
if (bt->accept (&bt_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "base type visit failed\n"),
+ ACE_TEXT ("be_visitor_sequence_cs::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("base type visit failed\n")),
-1);
}
@@ -135,12 +138,15 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
<< " : " << be_idt << be_idt;
// Pass it to the base constructor.
- if (node->gen_base_class_name (os, "", this->ctx_->scope ()->decl ()) == -1)
+ if (node->gen_base_class_name (os,
+ "",
+ this->ctx_->scope ()->decl ()) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "codegen for base sequence class\n"),
+ ACE_TEXT ("be_visitor_sequence_cs::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("codegen for base ")
+ ACE_TEXT ("sequence class\n")),
-1);
}
@@ -164,12 +170,15 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
<< " : " << be_idt << be_idt;
// Pass it to the base constructor.
- if (node->gen_base_class_name (os, "", this->ctx_->scope ()->decl ()) == -1)
+ if (node->gen_base_class_name (os,
+ "",
+ this->ctx_->scope ()->decl ()) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_sequence_cs::"
- "visit_sequence - "
- "codegen for base sequence class\n"),
+ ACE_TEXT ("be_visitor_sequence_cs::")
+ ACE_TEXT ("visit_sequence - ")
+ ACE_TEXT ("codegen for base ")
+ ACE_TEXT ("sequence class\n")),
-1);
}
@@ -207,14 +216,19 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
<< "}";
}
- if (be_global->any_support () && !node->anonymous ())
+ if (be_global->any_support ()
+ && !node->anonymous ()
+ && (!node->is_local ()
+ || be_global->gen_local_iface_anyops ()))
{
*os << be_nl << be_nl
<< "void "
- << node->name () << "::_tao_any_destructor (" << be_idt << be_idt_nl
+ << node->name () << "::_tao_any_destructor ("
+ << be_idt << be_idt_nl
<< "void * _tao_void_pointer)" << be_uidt << be_uidt_nl
<< "{" << be_idt_nl
- << node->local_name () << " * _tao_tmp_pointer =" << be_idt_nl
+ << node->local_name () << " * _tao_tmp_pointer ="
+ << be_idt_nl
<< "static_cast<" << node->local_name ()
<< " *> (_tao_void_pointer);" << be_uidt_nl
<< "delete _tao_tmp_pointer;" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp
index 7f3410ca09c..da53e48b739 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp
@@ -43,32 +43,27 @@ int be_visitor_structure_ch::visit_structure (be_structure *node)
// Generate the _var and _out typedefs.
node->gen_common_varout (os);
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
+ *os << be_nl << be_nl;
+
+ *os << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;
*os << be_nl << be_nl
<< "struct " << be_global->stub_export_macro () << " "
<< node->local_name () << be_nl
- << "{" << be_idt_nl;
+ << "{" << be_idt;
- // Generate the typedefs.
- *os << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;"
- << be_nl << be_nl;
-
- if (be_global->any_support ())
- {
- *os << "static void _tao_any_destructor (void *);";
- }
+ node->gen_stub_decls (os);
+
+ *os << be_nl;
// Generate code for field members.
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ch::"
- "visit_structure - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_structure_ch::")
+ ACE_TEXT ("visit_structure - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -83,9 +78,9 @@ int be_visitor_structure_ch::visit_structure (be_structure *node)
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_structure_ch::"
- "visit_structure - "
- "TypeCode declaration failed\n"),
+ ACE_TEXT ("be_visitor_structure_ch::")
+ ACE_TEXT ("visit_structure - ")
+ ACE_TEXT ("TypeCode declaration failed\n")),
-1);
}
}
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
index 3c8227eec4a..aff66b8fae4 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
@@ -105,6 +105,12 @@ be_visitor_typecode_decl::visit_component (be_component *node)
}
int
+be_visitor_typecode_decl::visit_connector (be_connector *node)
+{
+ return this->visit_type (node);
+}
+
+int
be_visitor_typecode_decl::visit_home (be_home *node)
{
return this->visit_type (node);
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
index ab0ef09ddb2..080347c4782 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp
@@ -59,16 +59,11 @@ int be_visitor_union_ch::visit_union (be_union *node)
<< node->local_name () << " (const " << node->local_name ()
<< " &);" << be_nl
// Generate destructor.
- << "~" << node->local_name () << " (void);" << be_nl;
-
- if (be_global->any_support ())
- {
- *os << "static void _tao_any_destructor (void*);"
- << be_nl << be_nl;
- }
+ << "~" << node->local_name () << " (void);";
// Generate assignment operator.
- *os << node->local_name () << " &operator= (const "
+ *os << be_nl << be_nl
+ << node->local_name () << " &operator= (const "
<< node->local_name () << " &);";
// Retrieve the disriminant type.
@@ -91,20 +86,13 @@ int be_visitor_union_ch::visit_union (be_union *node)
if (bt->accept (&ud_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- " visit_union - "
- "codegen for discriminant failed\n"),
+ ACE_TEXT ("be_visitor_union_ch::")
+ ACE_TEXT (" visit_union - ")
+ ACE_TEXT ("codegen for discriminant failed\n")),
-1);
}
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- // Generate the typedefs.
- *os << be_nl << be_nl
- << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;";
+ node->gen_stub_decls (os);
// Now generate the public defn for the union branch members. For this,
// set our state to reflect what we are aiming to do.
@@ -113,9 +101,10 @@ int be_visitor_union_ch::visit_union (be_union *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for public defn of union members\n"),
+ ACE_TEXT ("be_visitor_union_ch::")
+ ACE_TEXT ("visit_union - ")
+ ACE_TEXT ("codegen for public ")
+ ACE_TEXT ("defn of union members\n")),
-1);
}
@@ -125,9 +114,10 @@ int be_visitor_union_ch::visit_union (be_union *node)
if (node->default_value (dv) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "computing default value failed\n"),
+ ACE_TEXT ("be_visitor_union_ch::")
+ ACE_TEXT ("visit_union - ")
+ ACE_TEXT ("computing default ")
+ ACE_TEXT ("value failed\n")),
-1);
}
@@ -158,9 +148,10 @@ int be_visitor_union_ch::visit_union (be_union *node)
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "codegen for private members of union\n"),
+ ACE_TEXT ("be_visitor_union_ch::")
+ ACE_TEXT ("visit_union - ")
+ ACE_TEXT ("codegen for private")
+ ACE_TEXT (" members of union\n")),
-1);
}
@@ -182,9 +173,9 @@ int be_visitor_union_ch::visit_union (be_union *node)
if (node->accept (&tc_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ch::"
- "visit_union - "
- "TypeCode declaration failed\n"),
+ ACE_TEXT ("be_visitor_union_ch::")
+ ACE_TEXT ("visit_union - ")
+ ACE_TEXT ("TypeCode declaration failed\n")),
-1);
}
}
diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp
index 1586c34fd95..bd55e9d8ea5 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp
@@ -64,14 +64,13 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node)
*os << be_uidt << be_nl
<< "{" << be_nl
- << "public:" << be_idt_nl
- << "typedef " << node->local_name () << " * _ptr_type;" << be_nl
- << "typedef " << node->local_name () << "_var _var_type;" << be_nl
- << "typedef " << node->local_name () << "_out _out_type;"
- << be_nl << be_nl;
+ << "public:" << be_idt;
+
+ node->gen_stub_decls (os);
// _downcast method
- *os << "static " << node->local_name () << "* "
+ *os << be_nl << be_nl
+ << "static " << node->local_name () << "* "
<< "_downcast ( ::CORBA::ValueBase *);" << be_nl;
// _copy_value method
@@ -93,13 +92,6 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node)
<< node->local_name () << " *&" << be_uidt_nl
<< ");" << be_uidt_nl << be_nl;
-
- if (be_global->any_support ())
- {
- *os << "static void _tao_any_destructor (void *);"
- << be_nl;
- }
-
if (be_global->tc_support ())
{
*os << "virtual ::CORBA::TypeCode_ptr _tao_type (void) const;"
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
index 97ee7d343fe..2579e9e9243 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
@@ -14,7 +14,6 @@
*/
//=============================================================================
-
// ******************************************************
// Valuetype visitor for client header
// ******************************************************
@@ -167,24 +166,22 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
// Generate the body.
*os << be_uidt << be_uidt_nl
<< "{" << be_nl
- << "public:" << be_idt_nl
- << "typedef " << node->local_name () << " * _ptr_type;" << be_nl
- << "typedef " << node->local_name () << "_var _var_type;"
- << be_nl
- << "typedef " << node->local_name () << "_out _out_type;"
- << be_nl << be_nl;
+ << "public:" << be_idt;
+
+ node->gen_stub_decls (os);
if (is_an_amh_exception_holder)
{
// Generate the constructor and destructor.
- *os << node->local_name () << " ( ::CORBA::Exception *ex)" << be_idt_nl
+ *os << be_nl << be_nl
+ << node->local_name () << " ( ::CORBA::Exception *ex)" << be_idt_nl
<< ": exception (ex)" << be_uidt_nl
<< "{}" << be_nl << be_nl
- << "virtual ~" << node->local_name () << " (void);"
- << be_nl << be_nl;
+ << "virtual ~" << node->local_name () << " (void);";
}
- *os << "static " << node->local_name () << "* "
+ *os << be_nl << be_nl
+ << "static " << node->local_name () << "* "
<< "_downcast ( ::CORBA::ValueBase *v);" << be_nl
<< be_nl
<< "// (TAO extensions or internals)" << be_nl
@@ -199,12 +196,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
<< "_tao_obv_truncatable_repo_ids (Repository_Id_List &) const;"
<< be_nl << be_nl
<< "static const char* "
- << "_tao_obv_static_repository_id (void);" << be_nl << be_nl;
-
- if (be_global->any_support ())
- {
- *os << "static void _tao_any_destructor (void *);";
- }
+ << "_tao_obv_static_repository_id (void);";
if (be_global->tc_support ())
{
@@ -216,9 +208,9 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (this->visit_valuetype_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_valuetype - "
- "codegen for scope failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_valuetype - ")
+ ACE_TEXT ("codegen for scope failed\n")),
-1);
}
@@ -235,9 +227,10 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (status == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_valuetype - "
- "traversal of supported interfaces failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_valuetype - ")
+ ACE_TEXT ("traversal of supported ")
+ ACE_TEXT ("interfaces failed\n")),
-1);
}
@@ -359,9 +352,10 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (visitor.visit_valuetype (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_valuetype - "
- "failed to generate _init construct.\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_valuetype - ")
+ ACE_TEXT ("failed to generate ")
+ ACE_TEXT ("_init construct.\n")),
-1);
}
@@ -374,9 +368,9 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_structure - "
- "TypeCode declaration failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_structure - ")
+ ACE_TEXT ("TypeCode declaration failed\n")),
-1);
}
}
@@ -409,9 +403,9 @@ be_visitor_valuetype_ch::visit_operation (be_operation *node)
if (!bt)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_operation - "
- "Bad return type\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_operation - ")
+ ACE_TEXT ("Bad return type\n")),
-1);
}
@@ -421,9 +415,9 @@ be_visitor_valuetype_ch::visit_operation (be_operation *node)
if (bt->accept (&or_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_operation - "
- "codegen for return type failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_operation - ")
+ ACE_TEXT ("codegen for return type failed\n")),
-1);
}
@@ -436,9 +430,10 @@ be_visitor_valuetype_ch::visit_operation (be_operation *node)
if (node->accept (&ooa_visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "visit_operation - "
- "codegen for argument list failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("visit_operation - ")
+ ACE_TEXT ("codegen for argument ")
+ ACE_TEXT ("list failed\n")),
-1);
}
@@ -470,8 +465,8 @@ be_visitor_valuetype_ch::visit_field (be_field *node)
if (node->accept (&visitor) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_obv_ch::"
- "visit_field - codegen failed\n"),
+ ACE_TEXT ("be_visitor_valuetype_obv_ch::")
+ ACE_TEXT ("visit_field - codegen failed\n")),
-1);
}
@@ -516,9 +511,9 @@ be_visitor_valuetype_ch::gen_supported_ops (be_interface *,
if (d == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "gen_supported_ops - "
- "bad node in this scope\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("gen_supported_ops - ")
+ ACE_TEXT ("bad node in this scope\n")),
-1);
}
@@ -532,9 +527,9 @@ be_visitor_valuetype_ch::gen_supported_ops (be_interface *,
if (visitor.visit_operation (op) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_valuetype_ch::"
- "gen_supported_ops - "
- "failed to accept visitor\n"),
+ ACE_TEXT ("be_visitor_valuetype_ch::")
+ ACE_TEXT ("gen_supported_ops - ")
+ ACE_TEXT ("failed to accept visitor\n")),
-1);
}
}
diff --git a/TAO/TAO_IDL/be_include/be_component.h b/TAO/TAO_IDL/be_include/be_component.h
index 2854ce78553..32ab8f5a009 100644
--- a/TAO/TAO_IDL/be_include/be_component.h
+++ b/TAO/TAO_IDL/be_include/be_component.h
@@ -67,14 +67,23 @@ public:
ACE_CDR::ULong n_consumes (void) const;
ACE_CDR::ULong n_emits (void) const;
+ /// Update the has_* members.
+ void scan (UTL_Scope *s);
+
+ /// Generate the "public virtual" entries in the stub header.
+ virtual void gen_stub_inheritance (TAO_OutStream *os);
+
+ /// Generate the string compares for ancestors in _is_a().
+ virtual int gen_is_a_ancestors (TAO_OutStream *os);
+
+ /// Generate setup_collocation() for base component, if any.
+ virtual void gen_parent_collocation (TAO_OutStream *os);
+
// Narrowing.
DEF_NARROW_FROM_DECL (be_component);
DEF_NARROW_FROM_SCOPE (be_component);
- /// Update the has_* members.
- void scan (UTL_Scope *s);
-
private:
/// Specialized version for mirror ports.
void mirror_scan (AST_PortType *p);
diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h
index 6995ad453c2..098d9e2b65b 100644
--- a/TAO/TAO_IDL/be_include/be_interface.h
+++ b/TAO/TAO_IDL/be_include/be_interface.h
@@ -340,6 +340,15 @@ public:
bool dds_connector_traits_done (void) const;
void dds_connector_traits_done (bool val);
+ /// Generate the "public virtual" entries in the stub header.
+ virtual void gen_stub_inheritance (TAO_OutStream *os);
+
+ /// Generate the string compares for ancestors in _is_a().
+ virtual int gen_is_a_ancestors (TAO_OutStream *os);
+
+ /// Generate setup_collocation() for base component, if any.
+ virtual void gen_parent_collocation (TAO_OutStream *os);
+
protected:
/**
* CDreate a new string made by the concatenation
diff --git a/TAO/TAO_IDL/be_include/be_type.h b/TAO/TAO_IDL/be_include/be_type.h
index b32615904ca..2add00a446d 100644
--- a/TAO/TAO_IDL/be_include/be_type.h
+++ b/TAO/TAO_IDL/be_include/be_type.h
@@ -65,6 +65,9 @@ public:
/// Generate _var and _out typedefs for structs and unions.
void gen_common_varout (TAO_OutStream *os);
+
+ /// Generate common typedef and any destructor decl.
+ void gen_stub_decls (TAO_OutStream *os);
/// Accessors for the member.
bool seen_in_sequence (void) const;
diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h
index 171816a914d..811d0697a1d 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h
@@ -42,8 +42,8 @@ public:
virtual ~be_visitor_args (void);
//= helper
- /// helper that produces either a nested name for header files or full name
- /// for others
+ /// helper that produces either a nested name for
+ /// header files or full name for others.
virtual const char *type_name (be_type *type,
const char *suffix = 0);
@@ -54,6 +54,12 @@ public:
virtual int visit_argument (be_argument *node);
void set_fixed_direction (AST_Argument::Direction direction);
+
+protected:
+ /// Consolidation of common code from invoke_cs and marshal_ss
+ /// for predefined type args.
+ int gen_pd_arg (be_predefined_type *node,
+ bool for_stub);
private:
int fixed_direction_;
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component.h b/TAO/TAO_IDL/be_include/be_visitor_component.h
index 95b3b97243c..4f7e30736f7 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_component.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_component.h
@@ -20,9 +20,6 @@
#include "be_visitor_component_scope.h"
#include "be_visitor_component/component.h"
-#include "be_visitor_component/component_ch.h"
-#include "be_visitor_component/component_ci.h"
-#include "be_visitor_component/component_cs.h"
#include "be_visitor_component/component_sh.h"
#include "be_visitor_component/component_si.h"
#include "be_visitor_component/component_ss.h"
@@ -45,9 +42,5 @@
#include "be_visitor_component/component_exs.h"
#include "be_visitor_component/facet_exs.h"
#include "be_visitor_component/executor_exs.h"
-#include "be_visitor_component/any_op_ch.h"
-#include "be_visitor_component/any_op_cs.h"
-#include "be_visitor_component/cdr_op_ch.h"
-#include "be_visitor_component/cdr_op_cs.h"
#endif /* TAO_BE_VISITOR_COMPONENT_H */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_component/any_op_ch.h
deleted file mode 100644
index 877422cfd4a..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/any_op_ch.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- c++ -*- */
-//=============================================================================
-/**
- * @file any_op_ch.h
- *
- * $Id$
- *
- * Concrete visitor for the Component node.
- * This one provides code generation for the Any operators
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-#ifndef _BE_COMPONENT_ANY_OP_CH_H_
-#define _BE_COMPONENT_ANY_OP_CH_H_
-
-/**
- * @class be_visitor_component_any_op_ch
- *
- * @brief be_visitor_component_any_op_ch
- *
- * This is a concrete visitor for component that generates the Any
- * operator declarations
- */
-class be_visitor_component_any_op_ch : public be_visitor_component
-{
-
-public:
- be_visitor_component_any_op_ch (be_visitor_context *ctx);
- ~be_visitor_component_any_op_ch (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_COMPONENT_ANY_OP_CH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_component/any_op_cs.h
deleted file mode 100644
index dc2016d7c4b..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/any_op_cs.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-//=============================================================================
-/**
- * @file any_op_cs.h
- *
- * $Id$
- *
- * Concrete visitor for the Component node.
- * This one provides code generation for the Any operators
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-#ifndef _BE_COMPONENT_ANY_OP_CS_H_
-#define _BE_COMPONENT_ANY_OP_CS_H_
-
-/**
- * @class be_visitor_component_any_op_cs
- *
- * @brief be_visitor_interface_any_op_cs
- *
- * This is a concrete visitor for interface that generates the Any operator
- * implementations
- */
-class be_visitor_component_any_op_cs : public be_visitor_component
-{
-public:
- be_visitor_component_any_op_cs (be_visitor_context *ctx);
- ~be_visitor_component_any_op_cs (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_COMPONENT_ANY_OP_CS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_ch.h
deleted file mode 100644
index f0869b72faf..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_ch.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- c++ -*- */
-
-//=============================================================================
-/**
- * @file cdr_op_ch.h
- *
- * $Id$
- *
- * Concrete visitor for the Component class
- * This one provides code generation for the CDR operators for the
- * component in the client header.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-#ifndef _BE_VISITOR_COMPONENT_CDR_OP_CH_H_
-#define _BE_VISITOR_COMPONENT_CDR_OP_CH_H_
-
-/**
- * @class be_visitor_component_cdr_op_ch
- *
- * @brief be_visitor_component_cdr_op_ch
- *
- * This is a concrete visitor for component that generates the CDR operator
- * declarations
- */
-class be_visitor_component_cdr_op_ch : public be_visitor_component
-{
-public:
- be_visitor_component_cdr_op_ch (be_visitor_context *ctx);
- ~be_visitor_component_cdr_op_ch (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_VISITOR_COMPONENT_CDR_OP_CH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_cs.h
deleted file mode 100644
index e400b0ca1c7..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/cdr_op_cs.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- c++ -*- */
-
-//=============================================================================
-/**
- * @file cdr_op_cs.h
- *
- * $Id$
- *
- * Concrete visitor for the Component class
- * This one provides code generation for the CDR operators for the
- * component in the client stub.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-#ifndef _BE_VISITOR_COMPONENT_CDR_OP_CS_H_
-#define _BE_VISITOR_COMPONENT_CDR_OP_CS_H_
-
-/**
- * @class be_visitor_component_cdr_op_cs
- *
- * @brief be_visitor_component_cdr_op_cs
- *
- * This is a concrete visitor for component that generates the CDR operator
- * implementations
- */
-class be_visitor_component_cdr_op_cs : public be_visitor_component
-{
-public:
- be_visitor_component_cdr_op_cs (be_visitor_context *ctx);
- ~be_visitor_component_cdr_op_cs (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_VISITOR_COMPONENT_CDR_OP_CS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/component_ch.h b/TAO/TAO_IDL/be_include/be_visitor_component/component_ch.h
deleted file mode 100644
index 323663b6bb2..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/component_ch.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-//=============================================================================
-/**
- * @file component_ch.h
- *
- * $Id$
- *
- * Concrete visitor for the Component node.
- * This one provides code generation for components in the client header.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-
-#ifndef _BE_COMPONENT_COMPONENT_CH_H_
-#define _BE_COMPONENT_COMPONENT_CH_H_
-
-/**
- * @class be_visitor_component_ch
- *
- * @brief be_visitor_component_ch
- *
- * This is a concrete visitor to generate the client header for component.
- */
-class be_visitor_component_ch : public be_visitor_component
-{
-public:
- be_visitor_component_ch (be_visitor_context *ctx);
- ~be_visitor_component_ch (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_COMPONENT_COMPONENT_CH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/component_ci.h b/TAO/TAO_IDL/be_include/be_visitor_component/component_ci.h
deleted file mode 100644
index f206bb35c63..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/component_ci.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-//=============================================================================
-/**
- * @file component_ci.h
- *
- * $Id$
- *
- * Concrete visitor for the Component node.
- * This one provides code generation for components in the client inline.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-
-#ifndef _BE_COMPONENT_COMPONENT_CI_H_
-#define _BE_COMPONENT_COMPONENT_CI_H_
-
-/**
- * @class be_visitor_component_ci
- *
- * @brief be_visitor_interface_ci
- *
- * This is a concrete visitor to generate the client header for component.
- */
-class be_visitor_component_ci : public be_visitor_component
-{
-public:
- be_visitor_component_ci (be_visitor_context *ctx);
- ~be_visitor_component_ci (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_COMPONENT_COMPONENT_CI_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h b/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h
deleted file mode 100644
index b24e3ad676a..00000000000
--- a/TAO/TAO_IDL/be_include/be_visitor_component/component_cs.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-//=============================================================================
-/**
- * @file component_cs.h
- *
- * $Id$
- *
- * Concrete visitor for the Component node.
- * This one provides code generation for components in the client stub.
- *
- *
- * @author Jeff Parsons
- */
-//=============================================================================
-
-
-#ifndef _BE_COMPONENT_COMPONENT_CS_H_
-#define _BE_COMPONENT_COMPONENT_CS_H_
-
-/**
- * @class be_visitor_component_cs
- *
- * @brief be_visitor_component_cs
- *
- * This is a concrete visitor to generate the client stub for component.
- */
-class be_visitor_component_cs : public be_visitor_component
-{
-public:
- be_visitor_component_cs (be_visitor_context *ctx);
- ~be_visitor_component_cs (void);
-
- virtual int visit_component (be_component *node);
- virtual int visit_connector (be_connector *node);
-};
-
-#endif /* _BE_COMPONENT_COMPONENT_CS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_component_scope.h b/TAO/TAO_IDL/be_include/be_visitor_component_scope.h
index e013f2a6823..1544c8f2e76 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_component_scope.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_component_scope.h
@@ -39,7 +39,7 @@ public:
virtual int visit_extended_port (be_extended_port *node);
virtual int visit_mirror_port (be_mirror_port *node);
- /// Automatically recurses to the ancestor scopes, if any.
+ /// Automatically iterates over ancestor scopes, if any.
int visit_component_scope (be_component *node);
/// These two methods are used instead of overriding
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h
index 5760187a5fb..516196294a6 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h
@@ -20,6 +20,7 @@
#include "ace/SString.h"
#include "be_visitor_scope.h"
+
#include "be_visitor_interface/interface.h"
#include "be_visitor_interface/interface_ch.h"
#include "be_visitor_interface/interface_ci.h"
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h
index a1182ac4597..d0d7611a90f 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_ANY_OP_CH_H_
#define _BE_INTERFACE_ANY_OP_CH_H_
@@ -29,14 +28,12 @@ class be_visitor_interface_any_op_ch : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_any_op_ch (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_any_op_ch (void);
- /// visit interface
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
};
#endif /* _BE_INTERFACE_ANY_OP_CH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h
index 8a68d6918d5..9d159a43c0b 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_ANY_OP_CS_H_
#define _BE_INTERFACE_ANY_OP_CS_H_
@@ -29,14 +28,12 @@ class be_visitor_interface_any_op_cs : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_any_op_cs (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_any_op_cs (void);
- /// visit interface
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
};
#endif /* _BE_INTERFACE_ANY_OP_CS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h
index c8314e8f88e..b11a04cd44c 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_ch.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef _BE_VISITOR_INTERFACE_CDR_OP_CH_H_
#define _BE_VISITOR_INTERFACE_CDR_OP_CH_H_
@@ -31,14 +30,12 @@ class be_visitor_interface_cdr_op_ch : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_cdr_op_ch (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_cdr_op_ch (void);
- /// visit interface
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
};
#endif /* _BE_VISITOR_INTERFACE_CDR_OP_CH_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h
index db47580d9cb..274d6a31656 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/cdr_op_cs.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef _BE_VISITOR_INTERFACE_CDR_OP_CS_H_
#define _BE_VISITOR_INTERFACE_CDR_OP_CS_H_
@@ -31,14 +30,12 @@ class be_visitor_interface_cdr_op_cs : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_cdr_op_cs (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_cdr_op_cs (void);
- /// visit interface
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
};
#endif /* _BE_VISITOR_INTERFACE_CDR_OP_CS_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h
index 69c0a0a66d7..463bde1a2b9 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h
@@ -14,7 +14,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_INTERFACE_H_
#define _BE_INTERFACE_INTERFACE_H_
@@ -42,57 +41,31 @@ class AST_Operation;
*
* @brief be_visitor_interface
*
- * This is a concrete visitor for interface that abstracts all common tasks
+ * This is a concrete visitor for interface that abstracts
+ * all common tasks.
*/
class be_visitor_interface : public be_visitor_scope
{
public:
- /// constructor
be_visitor_interface (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface (void);
- /// visit the interface node
virtual int visit_interface (be_interface *node);
/// An override of the base class method so we can generate code for
/// any abstract parents the interface may have.
virtual int visit_scope (be_scope *node);
- // =visit methods on all elements syntactically valid in a Interface scope
-
- /// visit attribute
virtual int visit_attribute (be_attribute *node);
-
- /// visit a constant
virtual int visit_constant (be_constant *node);
-
- /// visit an native
virtual int visit_native (be_native *node);
-
- /// visit an enum
virtual int visit_enum (be_enum *node);
-
- /// visit an exception
virtual int visit_exception (be_exception *node);
-
- /// visit operation
virtual int visit_operation (be_operation *node);
-
- /// visit a structure
virtual int visit_structure (be_structure *node);
-
- /// visit a forward declared structure
virtual int visit_structure_fwd (be_structure_fwd *node);
-
- /// visit a union
virtual int visit_union (be_union *node);
-
- /// visit a union
virtual int visit_union_fwd (be_union_fwd *node);
-
- /// visit the typedef node
virtual int visit_typedef (be_typedef *node);
protected:
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h
index 3614b96fb01..2422a107da2 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_INTERFACE_CH_H_
#define _BE_INTERFACE_INTERFACE_CH_H_
@@ -30,14 +29,14 @@
class be_visitor_interface_ch : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_ch (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_ch (void);
- /// set the right context and make a visitor
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
+ virtual int visit_extended_port (be_extended_port *node);
+ virtual int visit_mirror_port (be_mirror_port *node);
/// Helper to generate the declarations for the operations
/// of any abstract parents we may have.
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h
index 7478ab0c319..52be8d905de 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_INTERFACE_CI_H_
#define _BE_INTERFACE_INTERFACE_CI_H_
@@ -27,14 +26,12 @@
class be_visitor_interface_ci : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_ci (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_ci (void);
- /// set the right context and make a visitor
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
};
#endif /* _BE_INTERFACE_INTERFACE_CI_H_ */
diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h
index 1bc2ebd35f6..d81807de86c 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef _BE_INTERFACE_INTERFACE_CS_H_
#define _BE_INTERFACE_INTERFACE_CS_H_
@@ -27,14 +26,14 @@
class be_visitor_interface_cs : public be_visitor_interface
{
public:
- /// constructor
be_visitor_interface_cs (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_interface_cs (void);
- /// set the right context and make a visitor
virtual int visit_interface (be_interface *node);
+ virtual int visit_component (be_component *node);
+ virtual int visit_connector (be_connector *node);
+ virtual int visit_extended_port (be_extended_port *node);
+ virtual int visit_mirror_port (be_mirror_port *node);
/// Helper to generate the definitions for the operations
/// of any abstract parents we may have.
diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h
index 66a9ce8129e..a52573c785a 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h
@@ -14,7 +14,6 @@
*/
//=============================================================================
-
#ifndef _BE_VISITOR_TYPECODE_TYPECODE_DECL_H_
#define _BE_VISITOR_TYPECODE_TYPECODE_DECL_H_
@@ -29,54 +28,25 @@ class be_visitor_typecode_decl : public be_visitor_decl
{
public:
- /// constructor
be_visitor_typecode_decl (be_visitor_context *ctx);
-
- /// destructor
~be_visitor_typecode_decl (void);
- /// visit a generic be_type node
+ /// visit a generic be_type node.
virtual int visit_type (be_type *node);
- // =visit methods on all types. They call the generic visit_type
-
- /// visit a array
virtual int visit_array (be_array *node);
-
- /// visit an enum
virtual int visit_enum (be_enum *node);
-
- /// visit an enum
virtual int visit_exception (be_exception *node);
-
- /// visit interface
virtual int visit_interface (be_interface *node);
-
- /// visit component
virtual int visit_component (be_component *node);
-
- /// visit home
+ virtual int visit_connector (be_connector *node);
virtual int visit_home (be_home *node);
-
- /// visit a sequence
virtual int visit_sequence (be_sequence *node);
-
- /// visit a structure
virtual int visit_structure (be_structure *node);
-
- /// visit a typedef
virtual int visit_typedef (be_typedef *node);
-
- /// visit a union
virtual int visit_union (be_union *node);
-
- /// visit a valuetype
virtual int visit_valuebox (be_valuebox *node);
-
- /// visit a valuetype
virtual int visit_valuetype (be_valuetype *node);
-
- /// visit a valuetype
virtual int visit_eventtype (be_eventtype *node);
};
diff --git a/TAO/tao/Adapter.h b/TAO/tao/Adapter.h
index d0e11552f78..6a0fd845adc 100644
--- a/TAO/tao/Adapter.h
+++ b/TAO/tao/Adapter.h
@@ -27,6 +27,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
+ class Object;
+ typedef Object * Object_ptr;
+
typedef TAO_Pseudo_Var_T<Object> Object_var;
typedef TAO_Pseudo_Out_T<Object> Object_out;
}
diff --git a/TAO/tao/AnyTypeCode/AnyTypeCode_methods.h b/TAO/tao/AnyTypeCode/AnyTypeCode_methods.h
index d954af4b0ad..32bbd304915 100644
--- a/TAO/tao/AnyTypeCode/AnyTypeCode_methods.h
+++ b/TAO/tao/AnyTypeCode/AnyTypeCode_methods.h
@@ -29,28 +29,14 @@
#include "tao/Basic_Types.h"
#include "tao/orbconf.h"
+#include "tao/CORBA_methods.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
- class NamedValue;
- typedef NamedValue *NamedValue_ptr;
-
- class NVList;
- typedef NVList *NVList_ptr;
-
- class TypeCode;
- typedef TypeCode *TypeCode_ptr;
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (NamedValue_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (NamedValue_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (NVList_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (NVList_ptr );
-
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (TypeCode_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION void release (TypeCode_ptr);
+ template<>
+ TAO_AnyTypeCode_Export void release (CORBA::TypeCode_ptr);
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/AnyTypeCode/NVList.cpp b/TAO/tao/AnyTypeCode/NVList.cpp
index 80f127fc5e6..6b0ef8aabc5 100644
--- a/TAO/tao/AnyTypeCode/NVList.cpp
+++ b/TAO/tao/AnyTypeCode/NVList.cpp
@@ -22,22 +22,18 @@
# include "tao/AnyTypeCode/NVList.inl"
#endif /* ! __ACE_INLINE__ */
-ACE_RCSID (AnyTypeCode,
- NVList,
- "$Id$")
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Reference counting for DII Request object
CORBA::ULong
-CORBA::NamedValue::_incr_refcnt (void)
+CORBA::NamedValue::_incr_refcount (void)
{
return ++this->refcount_;
}
CORBA::ULong
-CORBA::NamedValue::_decr_refcnt (void)
+CORBA::NamedValue::_decr_refcount (void)
{
CORBA::ULong const new_count = --this->refcount_;
@@ -60,13 +56,13 @@ CORBA::NamedValue::~NamedValue (void)
// ****************************************************************
CORBA::ULong
-CORBA::NVList::_incr_refcnt (void)
+CORBA::NVList::_incr_refcount (void)
{
return ++this->refcount_;
}
CORBA::ULong
-CORBA::NVList::_decr_refcnt (void)
+CORBA::NVList::_decr_refcount (void)
{
CORBA::ULong const new_count = --this->refcount_;
diff --git a/TAO/tao/AnyTypeCode/NVList.h b/TAO/tao/AnyTypeCode/NVList.h
index 1cf6aef8f21..a3af6fd0688 100644
--- a/TAO/tao/AnyTypeCode/NVList.h
+++ b/TAO/tao/AnyTypeCode/NVList.h
@@ -11,7 +11,6 @@
*/
//=============================================================================
-
#ifndef TAO_NVLIST_H
#define TAO_NVLIST_H
@@ -97,8 +96,8 @@ namespace CORBA
static NamedValue * _nil (void);
// = Reference counting.
- ULong _incr_refcnt (void);
- ULong _decr_refcnt (void);
+ ULong _incr_refcount (void);
+ ULong _decr_refcount (void);
// Useful for template programming.
typedef NamedValue_ptr _ptr_type;
@@ -195,8 +194,8 @@ namespace CORBA
static NVList * _nil (void);
// = Reference counting.
- ULong _incr_refcnt (void);
- ULong _decr_refcnt (void);
+ ULong _incr_refcount (void);
+ ULong _decr_refcount (void);
// = TAO Extensions:
diff --git a/TAO/tao/AnyTypeCode/NVList.inl b/TAO/tao/AnyTypeCode/NVList.inl
index d0514805ceb..861678e262f 100644
--- a/TAO/tao/AnyTypeCode/NVList.inl
+++ b/TAO/tao/AnyTypeCode/NVList.inl
@@ -4,21 +4,6 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA::NamedValue_ptr nv)
-{
- return nv == 0;
-}
-
-ACE_INLINE void
-CORBA::release (CORBA::NamedValue_ptr nv)
-{
- if (nv)
- nv->_decr_refcnt ();
-}
-
-// *************************************************************
-
ACE_INLINE
CORBA::NamedValue::NamedValue (void)
: refcount_ (1),
@@ -54,7 +39,7 @@ CORBA::NamedValue::_duplicate (CORBA::NamedValue * x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
@@ -70,25 +55,6 @@ CORBA::NamedValue::_nil (void)
// *************************************************************
ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::NVList_ptr nvl)
-{
- return (CORBA::Boolean) (nvl == 0);
-}
-
-ACE_INLINE
-void
-CORBA::release (CORBA::NVList_ptr nvl)
-{
- if (nvl)
- {
- nvl->_decr_refcnt ();
- }
-}
-
-// ****************************************************************
-
-ACE_INLINE
CORBA::NVList::NVList (void)
: max_ (0),
refcount_ (1),
@@ -112,7 +78,7 @@ CORBA::NVList::_duplicate (CORBA::NVList * x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/AnyTypeCode/TypeCode.cpp b/TAO/tao/AnyTypeCode/TypeCode.cpp
index b6bf5c65e20..c026a815d07 100644
--- a/TAO/tao/AnyTypeCode/TypeCode.cpp
+++ b/TAO/tao/AnyTypeCode/TypeCode.cpp
@@ -2,11 +2,6 @@
#include "tao/AnyTypeCode/TypeCode.h"
-ACE_RCSID (AnyTypeCode,
- TypeCode,
- "$Id$")
-
-
#if !defined (__ACE_INLINE__)
# include "tao/AnyTypeCode/TypeCode.inl"
#endif /* ! __ACE_INLINE__ */
diff --git a/TAO/tao/AnyTypeCode/TypeCode.inl b/TAO/tao/AnyTypeCode/TypeCode.inl
index ea1465a83a7..f9cc23f4439 100644
--- a/TAO/tao/AnyTypeCode/TypeCode.inl
+++ b/TAO/tao/AnyTypeCode/TypeCode.inl
@@ -4,17 +4,14 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA::TypeCode_ptr obj)
-{
- return obj == 0;
-}
-
+template<>
ACE_INLINE void
CORBA::release (CORBA::TypeCode_ptr obj)
{
- if (obj)
- obj->tao_release ();
+ if (obj != 0)
+ {
+ obj->tao_release ();
+ }
}
// --------------------------------------------------------------
diff --git a/TAO/tao/CORBA_methods.h b/TAO/tao/CORBA_methods.h
index b6ad992d720..c24c68fb561 100644
--- a/TAO/tao/CORBA_methods.h
+++ b/TAO/tao/CORBA_methods.h
@@ -37,18 +37,6 @@ namespace CORBA
class ORB;
typedef ORB *ORB_ptr;
- class Environment;
- typedef Environment *Environment_ptr;
-
- class Object;
- typedef Object *Object_ptr;
-
- class Principal;
- typedef Principal *Principal_ptr;
-
- class OperationDef;
- typedef OperationDef *OperationDef_ptr;
-
/**
* ORB Initialization
*/
@@ -65,17 +53,18 @@ namespace CORBA
const wchar_t * orb_name);
#endif
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (Environment_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION void release (Environment_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (ORB_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION void release (ORB_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (Object_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION void release (Object_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (Principal_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION void release (Principal_ptr);
+ template<typename T> inline Boolean is_nil (T x)
+ {
+ return x == 0;
+ }
+
+ template<typename T> inline void release (T x)
+ {
+ if (x != 0)
+ {
+ x->_decr_refcount ();
+ }
+ }
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/DynamicInterface/Context.cpp b/TAO/tao/DynamicInterface/Context.cpp
index 4f369575dda..b1bb9f70399 100644
--- a/TAO/tao/DynamicInterface/Context.cpp
+++ b/TAO/tao/DynamicInterface/Context.cpp
@@ -26,13 +26,13 @@ CORBA::Context::~Context (void)
}
CORBA::ULong
-CORBA::Context::_incr_refcnt (void)
+CORBA::Context::_incr_refcount (void)
{
return ++refcount_;
}
CORBA::ULong
-CORBA::Context::_decr_refcnt (void)
+CORBA::Context::_decr_refcount (void)
{
CORBA::ULong const new_count = --this->refcount_;
@@ -165,13 +165,13 @@ CORBA::ContextList::_destroy (void)
}
void
-CORBA::ContextList::_incr_refcnt (void)
+CORBA::ContextList::_incr_refcount (void)
{
++this->ref_count_;
}
void
-CORBA::ContextList::_decr_refcnt (void)
+CORBA::ContextList::_decr_refcount (void)
{
--this->ref_count_;
diff --git a/TAO/tao/DynamicInterface/Context.h b/TAO/tao/DynamicInterface/Context.h
index 5a381ee69c5..e0eb9101ca7 100644
--- a/TAO/tao/DynamicInterface/Context.h
+++ b/TAO/tao/DynamicInterface/Context.h
@@ -49,6 +49,12 @@ namespace CORBA
class NVList;
typedef NVList *NVList_ptr;
+
+ class Context;
+ typedef Context * Context_ptr;
+
+ class ContextList;
+ typedef ContextList * ContextList_ptr;
typedef TAO_Pseudo_Var_T<Context> Context_var;
typedef TAO_Pseudo_Out_T<Context> Context_out;
@@ -81,8 +87,8 @@ namespace CORBA
static Context *_nil (void);
// = Reference counting.
- CORBA::ULong _incr_refcnt (void);
- CORBA::ULong _decr_refcnt (void);
+ CORBA::ULong _incr_refcount (void);
+ CORBA::ULong _decr_refcount (void);
// = All the spec-required functions below will just throw a
// CORBA::NO_IMPLEMENT exception and do nothing else.
@@ -163,8 +169,8 @@ namespace CORBA
void remove (CORBA::ULong slot);
/// Increment and decrement ref counts.
- void _incr_refcnt (void);
- void _decr_refcnt (void);
+ void _incr_refcount (void);
+ void _decr_refcount (void);
// Useful for template programming.
typedef CORBA::ContextList_ptr _ptr_type;
diff --git a/TAO/tao/DynamicInterface/Context.inl b/TAO/tao/DynamicInterface/Context.inl
index 87c338e31e0..459cc2bca87 100644
--- a/TAO/tao/DynamicInterface/Context.inl
+++ b/TAO/tao/DynamicInterface/Context.inl
@@ -5,48 +5,12 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
-void
-CORBA::release (CORBA::Context_ptr x)
-{
- if (x != 0)
- {
- x->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::Context_ptr x)
-{
- return (CORBA::Boolean) (x == 0);
-}
-
-ACE_INLINE
-void
-CORBA::release (CORBA::ContextList *x)
-{
- if (x != 0)
- {
- x->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::ContextList_ptr x)
-{
- return (CORBA::Boolean) (x == 0);
-}
-
-// ===================================================================
-
-ACE_INLINE
CORBA::Context_ptr
CORBA::Context::_duplicate (CORBA::Context_ptr x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
@@ -88,7 +52,7 @@ CORBA::ContextList::_duplicate (CORBA::ContextList_ptr x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/DynamicInterface/DII_CORBA_methods.h b/TAO/tao/DynamicInterface/DII_CORBA_methods.h
index aea9e098cbb..4de9bd17a2c 100644
--- a/TAO/tao/DynamicInterface/DII_CORBA_methods.h
+++ b/TAO/tao/DynamicInterface/DII_CORBA_methods.h
@@ -31,38 +31,6 @@
#define TAO_EXPORT_MACRO TAO_DynamicInterface_Export
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-namespace CORBA
-{
- class ContextList;
- typedef ContextList *ContextList_ptr;
-
- class Context;
- typedef Context *Context_ptr;
-
- class ExceptionList;
- typedef ExceptionList *ExceptionList_ptr;
-
- class Request;
- typedef Request *Request_ptr;
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (Context_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (Context_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (ContextList_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (ContextList_ptr );
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (ExceptionList_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (ExceptionList_ptr);
-
- TAO_NAMESPACE_INLINE_FUNCTION void release (Request_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (Request_ptr);
-
-}
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
#include /**/ "ace/post.h"
#endif /* TAO_DII_CORBA_METHODS_H */
diff --git a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp
index cb4e04a7e8f..57a453ed077 100644
--- a/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp
+++ b/TAO/tao/DynamicInterface/Dynamic_Adapter_Impl.cpp
@@ -81,7 +81,7 @@ TAO_Dynamic_Adapter_Impl::context_release (CORBA::Context_ptr ctx)
{
if (ctx != 0)
{
- ctx->_decr_refcnt ();
+ ctx->_decr_refcount ();
}
}
@@ -96,7 +96,7 @@ TAO_Dynamic_Adapter_Impl::request_release (CORBA::Request_ptr req)
{
if (req != 0)
{
- req->_decr_refcnt ();
+ req->_decr_refcount ();
}
}
@@ -111,7 +111,7 @@ TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req)
{
if (req != 0)
{
- req->_decr_refcnt ();
+ req->_decr_refcount ();
}
}
diff --git a/TAO/tao/DynamicInterface/ExceptionList.cpp b/TAO/tao/DynamicInterface/ExceptionList.cpp
index 7263b740ba1..74dffaef6b4 100644
--- a/TAO/tao/DynamicInterface/ExceptionList.cpp
+++ b/TAO/tao/DynamicInterface/ExceptionList.cpp
@@ -74,24 +74,24 @@ CORBA::ExceptionList::remove (CORBA::ULong)
CORBA::ExceptionList_ptr
CORBA::ExceptionList::_duplicate (void)
{
- this->_incr_refcnt ();
+ this->_incr_refcount ();
return this;
}
void
CORBA::ExceptionList::_destroy (void)
{
- this->_decr_refcnt ();
+ this->_decr_refcount ();
}
void
-CORBA::ExceptionList::_incr_refcnt (void)
+CORBA::ExceptionList::_incr_refcount (void)
{
++this->ref_count_;
}
void
-CORBA::ExceptionList::_decr_refcnt (void)
+CORBA::ExceptionList::_decr_refcount (void)
{
CORBA::ULong const refcount = --this->ref_count_;
diff --git a/TAO/tao/DynamicInterface/ExceptionList.h b/TAO/tao/DynamicInterface/ExceptionList.h
index 28b7fc5b385..877249397fb 100644
--- a/TAO/tao/DynamicInterface/ExceptionList.h
+++ b/TAO/tao/DynamicInterface/ExceptionList.h
@@ -14,7 +14,6 @@
*/
//=============================================================================
-
#ifndef TAO_CORBA_EXCEPTIONLIST_H
#define TAO_CORBA_EXCEPTIONLIST_H
@@ -46,6 +45,9 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
+ class ExceptionList;
+ typedef ExceptionList * ExceptionList_ptr;
+
typedef TAO_Pseudo_Var_T<ExceptionList> ExceptionList_var;
typedef TAO_Pseudo_Out_T<ExceptionList> ExceptionList_out;
@@ -97,8 +99,8 @@ namespace CORBA
void remove (CORBA::ULong slot);
/// Increment and decrement ref counts.
- void _incr_refcnt (void);
- void _decr_refcnt (void);
+ void _incr_refcount (void);
+ void _decr_refcount (void);
/// Useful for template programming.
typedef CORBA::ExceptionList_ptr _ptr_type;
diff --git a/TAO/tao/DynamicInterface/ExceptionList.inl b/TAO/tao/DynamicInterface/ExceptionList.inl
index 62326650a10..3cc1340b963 100644
--- a/TAO/tao/DynamicInterface/ExceptionList.inl
+++ b/TAO/tao/DynamicInterface/ExceptionList.inl
@@ -5,25 +5,6 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
-void
-CORBA::release (CORBA::ExceptionList_ptr x)
-{
- if (x != 0)
- {
- x->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::ExceptionList_ptr x)
-{
- return x == 0;
-}
-
-// ===================================================================
-
-ACE_INLINE
CORBA::ExceptionList::ExceptionList (void)
: ref_count_ (1)
{
@@ -49,7 +30,7 @@ CORBA::ExceptionList::_duplicate (CORBA::ExceptionList_ptr x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp
index 92884047502..0764f125b9c 100644
--- a/TAO/tao/DynamicInterface/Request.cpp
+++ b/TAO/tao/DynamicInterface/Request.cpp
@@ -33,13 +33,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Reference counting for DII Request object.
CORBA::ULong
-CORBA::Request::_incr_refcnt (void)
+CORBA::Request::_incr_refcount (void)
{
return ++this->refcount_;
}
CORBA::ULong
-CORBA::Request::_decr_refcnt (void)
+CORBA::Request::_decr_refcount (void)
{
CORBA::ULong const new_count = --this->refcount_;
diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h
index 896d530c0da..5da63a1a932 100644
--- a/TAO/tao/DynamicInterface/Request.h
+++ b/TAO/tao/DynamicInterface/Request.h
@@ -173,8 +173,8 @@ namespace CORBA
static CORBA::Request* _nil (void);
// = Reference counting.
- CORBA::ULong _incr_refcnt (void);
- CORBA::ULong _decr_refcnt (void);
+ CORBA::ULong _incr_refcount (void);
+ CORBA::ULong _decr_refcount (void);
/// Set the lazy evaluation flag.
void _tao_lazy_evaluation (bool lazy_evaluation);
diff --git a/TAO/tao/DynamicInterface/Request.inl b/TAO/tao/DynamicInterface/Request.inl
index 05a9ffeb62a..a48debc6797 100644
--- a/TAO/tao/DynamicInterface/Request.inl
+++ b/TAO/tao/DynamicInterface/Request.inl
@@ -4,31 +4,12 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_INLINE
-void
-CORBA::release (CORBA::Request_ptr x)
-{
- if (x != 0)
- {
- x->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::Request_ptr x)
-{
- return (CORBA::Boolean) (x == 0);
-}
-
-// ===================================================================
-
ACE_INLINE CORBA::Request_ptr
CORBA::Request::_duplicate (CORBA::Request_ptr x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/DynamicInterface/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp
index 7900b2420f3..018c56c5e75 100644
--- a/TAO/tao/DynamicInterface/Server_Request.cpp
+++ b/TAO/tao/DynamicInterface/Server_Request.cpp
@@ -28,13 +28,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
// Reference counting for DSI ServerRequest object.
CORBA::ULong
-CORBA::ServerRequest::_incr_refcnt (void)
+CORBA::ServerRequest::_incr_refcount (void)
{
return ++this->refcount_;
}
CORBA::ULong
-CORBA::ServerRequest::_decr_refcnt (void)
+CORBA::ServerRequest::_decr_refcount (void)
{
CORBA::ULong const new_count = --this->refcount_;
diff --git a/TAO/tao/DynamicInterface/Server_Request.h b/TAO/tao/DynamicInterface/Server_Request.h
index 8c9db7c9233..41c8df2f76c 100644
--- a/TAO/tao/DynamicInterface/Server_Request.h
+++ b/TAO/tao/DynamicInterface/Server_Request.h
@@ -15,7 +15,6 @@
*/
//=============================================================================
-
#ifndef TAO_CORBA_SERVER_REQUEST_H
#define TAO_CORBA_SERVER_REQUEST_H
@@ -47,9 +46,6 @@ namespace CORBA
class ServerRequest;
typedef ServerRequest *ServerRequest_ptr;
- TAO_NAMESPACE_INLINE_FUNCTION void release (ServerRequest_ptr);
- TAO_NAMESPACE_INLINE_FUNCTION Boolean is_nil (ServerRequest_ptr);
-
typedef TAO_Pseudo_Var_T<ServerRequest> ServerRequest_var;
typedef TAO_Pseudo_Out_T<ServerRequest> ServerRequest_out;
@@ -117,8 +113,8 @@ namespace CORBA
static ServerRequest_ptr _nil (void);
// = Reference counting.
- CORBA::ULong _incr_refcnt (void);
- CORBA::ULong _decr_refcnt (void);
+ CORBA::ULong _incr_refcount (void);
+ CORBA::ULong _decr_refcount (void);
/// Set the lazy evaluation flag.
void _tao_lazy_evaluation (bool lazy_evaluation);
diff --git a/TAO/tao/DynamicInterface/Server_Request.inl b/TAO/tao/DynamicInterface/Server_Request.inl
index 926ecbd9532..c61d0e0ed83 100644
--- a/TAO/tao/DynamicInterface/Server_Request.inl
+++ b/TAO/tao/DynamicInterface/Server_Request.inl
@@ -4,31 +4,12 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_INLINE
-void
-CORBA::release (CORBA::ServerRequest_ptr x)
-{
- if (x != 0)
- {
- x->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::ServerRequest_ptr x)
-{
- return x == 0;
-}
-
-// ===================================================================
-
ACE_INLINE CORBA::ServerRequest_ptr
CORBA::ServerRequest::_duplicate (CORBA::ServerRequest_ptr x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp
index 9e37abb8179..b5f2f835b5d 100644
--- a/TAO/tao/Environment.cpp
+++ b/TAO/tao/Environment.cpp
@@ -9,12 +9,6 @@
# include "tao/Environment.inl"
#endif /* __ACE_INLINE__ */
-
-ACE_RCSID (tao,
- Environment,
- "$Id$")
-
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
CORBA::Environment::Environment (void)
diff --git a/TAO/tao/Environment.h b/TAO/tao/Environment.h
index cab9a5f89e8..c2b51ce77b7 100644
--- a/TAO/tao/Environment.h
+++ b/TAO/tao/Environment.h
@@ -15,6 +15,7 @@
* @author Carlos O'Ryan <coryan@cs.wustl.edu>
*/
//=============================================================================
+
#ifndef TAO_ENVIRONMENT_H
#define TAO_ENVIRONMENT_H
@@ -149,6 +150,12 @@ namespace CORBA
/// The previous environment on the "default environment stack".
Environment *previous_;
};
+
+ template<>
+ inline void release (Environment_ptr env)
+ {
+ delete env;
+ }
} // End CORBA namespace
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Environment.inl b/TAO/tao/Environment.inl
index a8547215d6d..8227415e62c 100644
--- a/TAO/tao/Environment.inl
+++ b/TAO/tao/Environment.inl
@@ -2,26 +2,11 @@
//
// $Id$
-
#include "ace/OS_Memory.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::Environment_ptr env)
-{
- return env == 0;
-}
-
-ACE_INLINE
-void
-CORBA::release (CORBA::Environment_ptr env)
-{
- delete env;
-}
-
-ACE_INLINE
CORBA::Exception *
CORBA::Environment::exception (void) const
{
diff --git a/TAO/tao/IFR_Client/IFR_Client_Adapter_Impl.cpp b/TAO/tao/IFR_Client/IFR_Client_Adapter_Impl.cpp
index 94b2276cbc0..1530495fe93 100644
--- a/TAO/tao/IFR_Client/IFR_Client_Adapter_Impl.cpp
+++ b/TAO/tao/IFR_Client/IFR_Client_Adapter_Impl.cpp
@@ -11,10 +11,6 @@
#include "tao/Invocation_Adapter.h"
#include "tao/Stub.h"
-ACE_RCSID (IFR_Client,
- IFR_Client_Adapter_Impl,
- "$Id$")
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO
diff --git a/TAO/tao/IORManipulation/IORManip_Filter.h b/TAO/tao/IORManipulation/IORManip_Filter.h
index e5b98736a97..91b8e9ee163 100644
--- a/TAO/tao/IORManipulation/IORManip_Filter.h
+++ b/TAO/tao/IORManipulation/IORManip_Filter.h
@@ -33,6 +33,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Profile;
class TAO_MProfile;
+namespace CORBA
+{
+ class Object;
+ typedef Object *Object_ptr;
+}
+
class TAO_IORManip_Export TAO_IORManip_Filter
{
public:
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index fa63bff2ce5..f031417a061 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -27,7 +27,6 @@
#include "tao/orb_typesC.h"
#include "tao/objectid.h"
-#include "tao/CORBA_methods.h"
#include "tao/VarOut_T.h"
#include "tao/Pseudo_VarOut_T.h"
#include "tao/Seq_Var_T.h"
@@ -71,6 +70,9 @@ namespace CORBA
class UnionMemberSeq;
class ValueMemberSeq;
class ORB_ObjectIdList;
+
+ class Object;
+ typedef Object * Object_ptr;
class ExceptionList;
typedef ExceptionList * ExceptionList_ptr;
@@ -89,6 +91,9 @@ namespace CORBA
class Policy;
typedef Policy *Policy_ptr;
+
+ class OperationDef;
+ typedef OperationDef * OperationDef_ptr;
typedef CORBA::ULong PolicyType;
@@ -505,9 +510,9 @@ namespace CORBA
#endif
/// Reference counting...
- unsigned long _incr_refcnt (void);
- unsigned long _decr_refcnt (void);
- unsigned long _refcnt (void) const;
+ unsigned long _incr_refcount (void);
+ unsigned long _decr_refcount (void);
+ unsigned long _refcount (void) const;
/// Set the IOR flag.
void _use_omg_ior_format (CORBA::Boolean ior);
diff --git a/TAO/tao/ORB.inl b/TAO/tao/ORB.inl
index 2024920b2ef..371e894f050 100644
--- a/TAO/tao/ORB.inl
+++ b/TAO/tao/ORB.inl
@@ -21,19 +21,19 @@ CORBA::ORB::set_timeout (ACE_Time_Value *timeout)
}
ACE_INLINE unsigned long
-CORBA::ORB::_incr_refcnt (void)
+CORBA::ORB::_incr_refcount (void)
{
return ++this->refcount_;
}
ACE_INLINE unsigned long
-CORBA::ORB::_refcnt (void) const
+CORBA::ORB::_refcount (void) const
{
return this->refcount_.value ();
}
ACE_INLINE unsigned long
-CORBA::ORB::_decr_refcnt (void)
+CORBA::ORB::_decr_refcount (void)
{
unsigned long const count = --this->refcount_;
@@ -51,7 +51,7 @@ CORBA::ORB::_duplicate (CORBA::ORB_ptr obj)
{
if (obj)
{
- obj->_incr_refcnt ();
+ obj->_incr_refcount ();
}
return obj;
@@ -83,21 +83,4 @@ CORBA::ORB::orb_core (void) const
return this->orb_core_;
}
-// ************************************************************
-// These are in CORBA namespace
-// ************************************************************
-
-ACE_INLINE CORBA::Boolean
-CORBA::is_nil (CORBA::ORB_ptr obj)
-{
- return obj == CORBA::ORB::_nil ();
-}
-
-ACE_INLINE void
-CORBA::release (CORBA::ORB_ptr obj)
-{
- if (!CORBA::is_nil (obj))
- obj->_decr_refcnt ();
-}
-
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index bcd10b83a63..57aa973a879 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -28,11 +28,6 @@
# include "tao/Object.inl"
#endif /* ! __ACE_INLINE__ */
-
-ACE_RCSID (tao,
- Object,
- "$Id$")
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
CORBA::Object::~Object (void)
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 7456d4f1efc..8a050dbfd6e 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -83,8 +83,13 @@ namespace CORBA
class Object;
typedef Object *Object_ptr;
+
typedef TAO_Pseudo_Var_T<Object> Object_var;
typedef TAO_Pseudo_Out_T<Object> Object_out;
+
+ template<>
+ TAO_Export Boolean
+ is_nil (Object_ptr);
/**
* @class Object
@@ -337,6 +342,10 @@ namespace CORBA
/// implement Smart Proxies and no others.
virtual char* convert_to_ior (bool use_omg_ior_format,
const char* ior_prefix) const;
+
+ /// Wrapper for _remove_ref(), naming convention for
+ /// templatizing.
+ inline void _decr_refcount (void);
protected:
diff --git a/TAO/tao/Object.inl b/TAO/tao/Object.inl
index ee055d70f41..c3434283af8 100644
--- a/TAO/tao/Object.inl
+++ b/TAO/tao/Object.inl
@@ -2,9 +2,24 @@
//
// $Id$
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
// ****************************************************************
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+template<>
+ACE_INLINE
+CORBA::Boolean
+CORBA::is_nil (CORBA::Object_ptr obj)
+{
+ if (obj == 0)
+ {
+ return true;
+ }
+
+ return CORBA::Object::is_nil_i (obj);
+}
+
+// ****************************************************************
ACE_INLINE
CORBA::Object::Object (int)
@@ -28,33 +43,6 @@ CORBA::Object::_duplicate (CORBA::Object_ptr obj)
return obj;
}
-// ************************************************************
-// These are in CORBA namespace
-
-ACE_INLINE
-void
-CORBA::release (CORBA::Object_ptr obj)
-{
- if (obj)
- {
- obj->_remove_ref ();
- }
-}
-
-ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::Object_ptr obj)
-{
- if (obj == 0)
- {
- return true;
- }
-
- return CORBA::Object::is_nil_i (obj);
-}
-
-// ************************************************************
-
// Null pointers represent nil objects.
ACE_INLINE
@@ -95,4 +83,10 @@ CORBA::Object::ior (void) const
return this->ior_.in ();
}
+inline void
+CORBA::Object::_decr_refcount (void)
+{
+ this->_remove_ref ();
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp
index 08652b88096..f552ab086ae 100644
--- a/TAO/tao/Principal.cpp
+++ b/TAO/tao/Principal.cpp
@@ -11,11 +11,6 @@
#include "tao/Principal.inl"
#endif /* __ACE_INLINE__ */
-ACE_RCSID (tao,
- Principal,
- "$Id$")
-
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
CORBA::Principal::Principal (void)
diff --git a/TAO/tao/Principal.h b/TAO/tao/Principal.h
index 289a9be9a6e..9c19250c55e 100644
--- a/TAO/tao/Principal.h
+++ b/TAO/tao/Principal.h
@@ -13,7 +13,6 @@
*/
//=============================================================================
-
#ifndef TAO_PRINCIPAL_H
#define TAO_PRINCIPAL_H
@@ -68,8 +67,8 @@ namespace CORBA
static Principal * _nil (void);
// = Stuff required for memory management.
- unsigned long _incr_refcnt (void);
- unsigned long _decr_refcnt (void);
+ unsigned long _incr_refcount (void);
+ unsigned long _decr_refcount (void);
Principal (void);
diff --git a/TAO/tao/Principal.inl b/TAO/tao/Principal.inl
index 8ea7d1f905f..e2bc626f708 100644
--- a/TAO/tao/Principal.inl
+++ b/TAO/tao/Principal.inl
@@ -5,15 +5,8 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
-CORBA::Boolean
-CORBA::is_nil (CORBA::Principal_ptr principal)
-{
- return principal == 0;
-}
-
-ACE_INLINE
unsigned long
-CORBA::Principal::_decr_refcnt (void)
+CORBA::Principal::_decr_refcount (void)
{
unsigned long new_count = --this->refcount_;
@@ -24,18 +17,8 @@ CORBA::Principal::_decr_refcnt (void)
}
ACE_INLINE
-void
-CORBA::release (CORBA::Principal_ptr principal)
-{
- if (principal)
- {
- principal->_decr_refcnt ();
- }
-}
-
-ACE_INLINE
unsigned long
-CORBA::Principal::_incr_refcnt (void)
+CORBA::Principal::_incr_refcount (void)
{
return ++this->refcount_;
}
@@ -47,7 +30,7 @@ CORBA::Principal::_duplicate (CORBA::Principal * x)
{
if (x != 0)
{
- x->_incr_refcnt ();
+ x->_incr_refcount ();
}
return x;
diff --git a/TAO/tao/Unbounded_Sequence_CDR_T.h b/TAO/tao/Unbounded_Sequence_CDR_T.h
index d6926f06c94..0f8d280bb9a 100644
--- a/TAO/tao/Unbounded_Sequence_CDR_T.h
+++ b/TAO/tao/Unbounded_Sequence_CDR_T.h
@@ -19,7 +19,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO {
template <typename stream>
- bool demarshal_sequence(stream & strm, TAO::unbounded_value_sequence <CORBA::Short> & target) {
+ bool demarshal_sequence(stream & strm, unbounded_value_sequence <CORBA::Short> & target) {
typedef TAO::unbounded_value_sequence <CORBA::Short> sequence;
::CORBA::ULong new_length = 0;
if (!(strm >> new_length)) {
diff --git a/TAO/tao/Valuetype/AbstractBase.cpp b/TAO/tao/Valuetype/AbstractBase.cpp
index b52d979ad1b..147eb54a1f3 100644
--- a/TAO/tao/Valuetype/AbstractBase.cpp
+++ b/TAO/tao/Valuetype/AbstractBase.cpp
@@ -14,32 +14,8 @@
# include "tao/Valuetype/AbstractBase.inl"
#endif /* ! __ACE_INLINE__ */
-ACE_RCSID (Valuetype,
- AbstractBase,
- "$Id$")
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-// ************************************************************
-// These are in CORBA namespace
-
-void
-CORBA::release (CORBA::AbstractBase_ptr obj)
-{
- if (obj)
- {
- obj->_remove_ref ();
- }
-}
-
-CORBA::Boolean
-CORBA::is_nil (CORBA::AbstractBase_ptr obj)
-{
- return (obj == 0);
-}
-
-// ************************************************************
-
CORBA::AbstractBase::AbstractBase (void)
: is_objref_ (false)
, concrete_stubobj_ (0)
diff --git a/TAO/tao/Valuetype/AbstractBase.h b/TAO/tao/Valuetype/AbstractBase.h
index c6b5bc18ac9..e76e2683037 100644
--- a/TAO/tao/Valuetype/AbstractBase.h
+++ b/TAO/tao/Valuetype/AbstractBase.h
@@ -40,7 +40,8 @@ class TAO_Abstract_ServantBase;
namespace CORBA
{
- class ValueBase;
+ class AbstractBase;
+ typedef AbstractBase * AbstractBase_ptr;
typedef TAO_Pseudo_Var_T<AbstractBase> AbstractBase_var;
typedef TAO_Pseudo_Out_T<AbstractBase> AbstractBase_out;
@@ -126,6 +127,10 @@ namespace CORBA
*/
CORBA::Object_ptr equivalent_objref (void);
+ /// Wrapper for _remove_ref(), naming convention for
+ /// templatizing.
+ inline void _decr_refcount (void);
+
protected:
AbstractBase (void);
diff --git a/TAO/tao/Valuetype/AbstractBase.inl b/TAO/tao/Valuetype/AbstractBase.inl
index e29418e7154..90e033664c8 100644
--- a/TAO/tao/Valuetype/AbstractBase.inl
+++ b/TAO/tao/Valuetype/AbstractBase.inl
@@ -55,4 +55,10 @@ CORBA::AbstractBase::_is_local (void) const
return this->is_local_;
}
+inline void
+CORBA::AbstractBase::_decr_refcount (void)
+{
+ this->_remove_ref ();
+}
+
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Valuetype/Value_CORBA_methods.h b/TAO/tao/Valuetype/Value_CORBA_methods.h
index dde1c2837b7..969d832df7d 100644
--- a/TAO/tao/Valuetype/Value_CORBA_methods.h
+++ b/TAO/tao/Valuetype/Value_CORBA_methods.h
@@ -24,6 +24,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Basic_Types.h"
+#include "tao/CORBA_methods.h"
#if defined (TAO_EXPORT_MACRO)
#undef TAO_EXPORT_MACRO
@@ -39,14 +40,6 @@ namespace CORBA
extern TAO_Valuetype_Export void add_ref (ValueBase *);
extern TAO_Valuetype_Export void remove_ref (ValueBase *);
-
- class AbstractBase;
- typedef AbstractBase *AbstractBase_ptr;
-
- extern TAO_Valuetype_Export Boolean is_nil (AbstractBase_ptr);
- extern TAO_Valuetype_Export void release (AbstractBase_ptr);
-
-
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/ZIOP_Adapter.cpp b/TAO/tao/ZIOP_Adapter.cpp
index 1b18773362e..72646df886e 100644
--- a/TAO/tao/ZIOP_Adapter.cpp
+++ b/TAO/tao/ZIOP_Adapter.cpp
@@ -2,10 +2,6 @@
#include "tao/ZIOP_Adapter.h"
-ACE_RCSID(tao,
- ZIOP_Adapter,
- "$Id$")
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_ZIOP_Adapter::~TAO_ZIOP_Adapter (void)