diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-01-08 17:06:53 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-01-08 17:06:53 +0000 |
commit | 45153b80c248d182b7dfe6cdabdf261686923947 (patch) | |
tree | 37b47fc3de13ef50bba71fa5d40faa7fadc54b05 | |
parent | 8398a2529ea32d551d4c7b238ac1ecc527fb2a4e (diff) | |
download | ATCD-45153b80c248d182b7dfe6cdabdf261686923947.tar.gz |
ChangeLogTag: Wed Jan 8 11:03:23 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 18 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Any.cpp | 115 |
9 files changed, 206 insertions, 6 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 6ffa8e5acb8..d3861c4d2f8 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,21 @@ +Wed Jan 8 11:03:23 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * tao/Any.cpp: + + Added explicit template instantiations used in the + insertion/extraction operators. + + * TAO_IDL/be/be_visitor_array/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_enum/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_exception/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_structure/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp: + + Added code generation for explicit template instantiation + of template classes used in the Any operators. + Wed Jan 8 10:53:44 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * tao/Typecode.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 410a3ebc600..8ff46f273f3 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -100,6 +100,21 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << ");" << be_uidt << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_nl << be_nl + << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" + << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl + << "template class TAO::Any_Array_Impl_T<" << be_idt << be_idt_nl + << node->name () << "_slice," << be_nl + << node->name () << "_forany" << be_uidt_nl + << ">;" << be_uidt << be_uidt_nl + << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl + << "# pragma instantiate TAO::Any_Array_Impl_T<" << be_idt << be_idt_nl + << node->name () << "_slice," << be_nl + << node->name () << "_forany" << be_uidt_nl + << ">" << be_uidt_nl + << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; + node->cli_stub_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index 84ccd9f95b5..87048b92cb1 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -80,6 +80,17 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_nl << be_nl + << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" + << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl + << "template class TAO::Any_Basic_Impl_T<" << node->name () << ">;" + << be_uidt_nl + << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl + << "# pragma instantiate TAO::Any_Basic_Impl_T<" << node->name () + << ">" << be_nl + << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; + node->cli_stub_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 03a865cd57b..d82db0ff67a 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -116,6 +116,17 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_nl << be_nl + << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" + << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl + << "template class TAO::Any_Dual_Impl_T<" << node->name () << ">;" + << be_uidt_nl + << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl + << "# pragma instantiate TAO::Any_Dual_Impl_T<" << node->name () + << ">" << be_nl + << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; + // all we have to do is to visit the scope and generate code if (this->visit_scope (node) == -1) { 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 17ba53bebd6..a4f174cb25d 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 @@ -109,7 +109,9 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) } *os << node->full_name () << "," - << node->full_name () << "_var>;" << be_uidt_nl + << node->full_name () << "_var>;" << be_nl + << "template class TAO::Any_Impl_T<" << node->name () << ">;" + << be_uidt_nl << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl; if (node->is_abstract ()) @@ -121,8 +123,10 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << "# pragma instantiate TAO_Object_Manager<"; } - *os << node->full_name () << "," - << node->full_name () << "_var>" << be_uidt_nl + *os << node->full_name () << ", " + << node->full_name () << "_var>" << be_nl + << "# pragma instantiate TAO::Any_Impl_T<" << node->name () << ">" + << be_uidt_nl << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; // All we have to do is to visit the scope and generate code. diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index d4fc6497d06..8d99ac4abaf 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -115,6 +115,17 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_nl << be_nl + << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" + << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl + << "template class TAO::Any_Dual_Impl_T<" << node->name () << ">;" + << be_uidt_nl + << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl + << "# pragma instantiate TAO::Any_Dual_Impl_T<" << node->name () + << ">" << be_nl + << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; + // all we have to do is to visit the scope and generate code if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index fc97c9ea7c3..5014fab7cbe 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -115,6 +115,17 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_nl << be_nl + << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" + << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl + << "template class TAO::Any_Dual_Impl_T<" << node->name () << ">;" + << be_uidt_nl + << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl + << "# pragma instantiate TAO::Any_Dual_Impl_T<" << node->name () + << ">" << be_nl + << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; + // All we have to do is to visit the scope and generate code. if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp index 17c5914b35f..ae9bc162766 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp @@ -100,14 +100,18 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" << be_idt_nl - << " defined (ACE_HAS_GNU_REPO)" << be_idt_nl + << " defined (ACE_HAS_GNU_REPO)" << be_nl << "template class TAO_Valuetype_Manager<" << node->full_name () << ", " - << node->full_name () << "_var>;" << be_uidt_nl + << node->full_name () << "_var>;" << be_nl + << "template class TAO::Any_Impl_T<" << node->full_name () + << ">;" << be_uidt_nl << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl << "# pragma instantiate TAO_Valuetype_Manager<" << node->full_name () << ", " - << node->full_name () << "_var>" << be_uidt_nl + << node->full_name () << "_var>" << be_nl + << "# pragma instantiate TAO::Any_Impl_T<" << node->full_name () + << ">" << be_uidt_nl << "#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */"; node->cli_stub_any_op_gen (1); diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index c80a7b9565e..f6e023ca0bd 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -1118,3 +1118,118 @@ TAO::Any_Any_Impl::free_value (void) } +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class TAO::Any_Special_Basic_Impl_T< + CORBA::Boolean, + CORBA::Any::from_boolean, + CORBA::Any::to_boolean + >; + +template class TAO::Any_Special_Basic_Impl_T< + CORBA::Octet, + CORBA::Any::from_octet, + CORBA::Any::to_octet + >; + +template class TAO::Any_Special_Basic_Impl_T< + char, + CORBA::Any::from_char, + CORBA::Any::to_char + >; + +template class TAO::Any_Special_Basic_Impl_T< + CORBA::WChar, + CORBA::Any::from_wchar, + CORBA::Any::to_wchar + >; + +template class TAO::Any_Special_Impl_T< + char, + CORBA::Any::from_string, + CORBA::Any::to_string + >; + +template class TAO::Any_Special_Impl_T< + CORBA::WChar, + CORBA::Any::from_wstring, + CORBA::Any::to_wstring + >; + +template class TAO::Any_Basic_Impl_T<CORBA::Short>; +template class TAO::Any_Basic_Impl_T<CORBA::UShort>; +template class TAO::Any_Basic_Impl_T<CORBA::Long>; +template class TAO::Any_Basic_Impl_T<CORBA::ULong>; +template class TAO::Any_Basic_Impl_T<CORBA::LongLong>; +template class TAO::Any_Basic_Impl_T<CORBA::ULongLong>; +template class TAO::Any_Basic_Impl_T<CORBA::Float>; +template class TAO::Any_Basic_Impl_T<CORBA::Double>; +template class TAO::Any_Dual_Impl_T<CORBA::Any>; +template class TAO::Any_Impl_T<CORBA::TypeCode>; +template class TAO::Any_Dual_Impl_T<CORBA::Exception>; +template class TAO::Any_Impl_T<CORBA::Any>; +template class TAO::Any_Impl_T<char>; +template class TAO::Any_Impl_T<CORBA::WChar>; +template class TAO::Any_Impl_T<CORBA::Object>; +template class TAO::Any_Impl_T<CORBA::AbstractBase>; +template class TAO::Any_Impl_T<CORBA::ValueBase>; +template class TAO::Any_Impl_T<CORBA::Any>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate TAO::Any_Special_Basic_Impl_T< + CORBA::Boolean, + CORBA::Any::from_boolean, + CORBA::Any::to_boolean + > + +#pragma instantiate TAO::Any_Special_Basic_Impl_T< + CORBA::Octet, + CORBA::Any::from_octet, + CORBA::Any::to_octet + > + +#pragma instantiate TAO::Any_Special_Basic_Impl_T< + char, + CORBA::Any::from_char, + CORBA::Any::to_char + > + +#pragma instantiate TAO::Any_Special_Basic_Impl_T< + CORBA::WChar, + CORBA::Any::from_wchar, + CORBA::Any::to_wchar + > + +#pragma instantiate TAO::Any_Special_Impl_T< + char, + CORBA::Any::from_string, + CORBA::Any::to_string + > + +#pragma instantiate TAO::Any_Special_Impl_T< + CORBA::WChar, + CORBA::Any::from_wstring, + CORBA::Any::to_wstring + > + +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::Short> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::UShort> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::Long> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::ULong> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::LongLong> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::ULongLong> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::Float> +#pragma instantiate TAO::Any_Basic_Impl_T<CORBA::Double> +#pragma instantiate TAO::Any_Dual_Impl_T<CORBA::Any> +#pragma instantiate TAO::Any_Impl_T<CORBA::TypeCode> +#pragma instantiate TAO::Any_Dual_Impl_T<CORBA::Exception> +#pragma instantiate TAO::Any_Impl_T<CORBA::Any> +#pragma instantiate TAO::Any_Impl_T<char> +#pragma instantiate TAO::Any_Impl_T<CORBA::WChar> +#pragma instantiate TAO::Any_Impl_T<CORBA::Object> +#pragma instantiate TAO::Any_Impl_T<CORBA::AbstractBase> +#pragma instantiate TAO::Any_Impl_T<CORBA::ValueBase> +#pragma instantiate TAO::Any_Impl_T<CORBA::Any> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |