summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-27 19:47:14 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-27 19:47:14 +0000
commitb58fccf61b68912230ac1bcda6f8997c3c02c76a (patch)
tree1a0f2dba1fed43e929aecf73b605f7245e424b48
parent0a5fa825debcbdd6f96dc27d7c51188765328334 (diff)
downloadATCD-b58fccf61b68912230ac1bcda6f8997c3c02c76a.tar.gz
ChangeLogTag: Fri Jun 27 14:42:02 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref20
-rw-r--r--TAO/TAO_IDL/be/be_visitor_traits.cpp46
-rw-r--r--TAO/tao/Arg_Traits_T.h1
-rw-r--r--TAO/tao/Basic_Arguments.cpp2
-rw-r--r--TAO/tao/TAO.dsp8
5 files changed, 60 insertions, 17 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index fb8e2d03d77..1d472f9907c 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,23 @@
+Fri Jun 27 14:42:02 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_traits.cpp:
+
+ Changed logic for generation of declarations for Objref_Traits,
+ Value_Traits, and Array_Traits specializations. These may
+ not need to be generated in all cases.
+
+ * tao/Arg_Traits_T.h:
+
+ Cosmetic changes.
+
+ * tao/Basic_Arguments.cpp:
+
+ Added missing explicit template instantiation.
+
+ * tao/TAO.dsp:
+
+ Added missing header file to project.
+
Fri Jun 27 11:16:04 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_traits.cpp:
diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp
index 09b0e02f2a3..760a91999fe 100644
--- a/TAO/TAO_IDL/be/be_visitor_traits.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp
@@ -88,8 +88,17 @@ be_visitor_traits::visit_module (be_module *node)
int
be_visitor_traits::visit_interface (be_interface *node)
{
- if (node->cli_traits_gen ()
- || (node->imported () && !node->seen_in_operation ()))
+ if (node->cli_traits_gen ())
+ {
+ return 0;
+ }
+
+ // We want to generate the second block below only if we have
+ // been seen in an operation and the first block only if we
+ // are forward declared in this file but not defined. If neither
+ // of these conditions hold, just skip this call.
+ if (!node->seen_in_operation ()
+ && (node->imported () || node->is_defined ()))
{
return 0;
}
@@ -193,8 +202,17 @@ be_visitor_traits::visit_interface_fwd (be_interface_fwd *node)
int
be_visitor_traits::visit_valuetype (be_valuetype *node)
{
- if (node->cli_traits_gen ()
- || (node->imported () && !node->seen_in_operation ()))
+ if (node->cli_traits_gen ())
+ {
+ return 0;
+ }
+
+ // We want to generate the second block below only if we have
+ // been seen in an operation and the first block only if we
+ // are forward declared in this file but not defined. If neither
+ // of these conditions hold, just skip this call.
+ if (!node->seen_in_operation ()
+ && (node->imported () || node->is_defined ()))
{
return 0;
}
@@ -339,7 +357,7 @@ be_visitor_traits::visit_string (be_string *node)
unsigned long bound = node->max_size ()->ev ()->u.ulval;
be_typedef *alias = this->ctx_->alias ();
- // Unbounded (w)strings can be handled as a predefined type.
+ // Unbounded (w)string args are handled as a predefined type.
// Bounded (w)strings must come in as a typedef - they can't
// be used directly as arguments or return types.
if (bound == 0 || alias == 0)
@@ -376,12 +394,22 @@ be_visitor_traits::visit_string (be_string *node)
int
be_visitor_traits::visit_array (be_array *node)
{
- if (node->cli_traits_gen ()
- || (node->imported () && !node->seen_in_operation ()))
+ if (node->cli_traits_gen ())
{
return 0;
}
+ if (!node->seen_in_operation ())
+ {
+ // @@@ (JP) I don't think we have to generate the Array_Traits decl.
+ /*
+ if (node->imported ())
+ {
+ return 0;
+ }
+ */
+ }
+
TAO_OutStream *os = this->ctx_->stream ();
*os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
@@ -389,6 +417,8 @@ be_visitor_traits::visit_array (be_array *node)
os->gen_ifdef_macro (node->flat_name (), "arg_traits");
+ // @@@ (JP) I don't think we have to generate the Array_Traits decl.
+/*
// This is used by the _var and _out classes, so it should always be
// generated in the main file.
if (!node->imported ())
@@ -413,7 +443,7 @@ be_visitor_traits::visit_array (be_array *node)
<< ");" << be_uidt << be_uidt_nl
<< "};";
}
-
+*/
// This should be generated even for imported nodes. The ifdef guard prevents
// multiple declarations.
if (node->seen_in_operation ())
diff --git a/TAO/tao/Arg_Traits_T.h b/TAO/tao/Arg_Traits_T.h
index 1093548aa1e..90e736a4170 100644
--- a/TAO/tao/Arg_Traits_T.h
+++ b/TAO/tao/Arg_Traits_T.h
@@ -31,7 +31,6 @@ namespace TAO
class Arg_Traits
{
};
-
};
#include "ace/post.h"
diff --git a/TAO/tao/Basic_Arguments.cpp b/TAO/tao/Basic_Arguments.cpp
index 8f487e39922..3de4c2c48ec 100644
--- a/TAO/tao/Basic_Arguments.cpp
+++ b/TAO/tao/Basic_Arguments.cpp
@@ -8,6 +8,7 @@ ACE_RCSID (tao,
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class TAO::Arg_Traits_T<void>;
template class TAO::Arg_Traits_T<CORBA::Short>;
template class TAO::Arg_Traits_T<CORBA::Long>;
template class TAO::Arg_Traits_T<CORBA::UShort>;
@@ -30,6 +31,7 @@ template class TAO::Basic_Arg_Traits_T<CORBA::LongDouble>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+# pragma instantiate TAO::Arg_Traits_T<void>
# pragma instantiate TAO::Arg_Traits_T<CORBA::Short>
# pragma instantiate TAO::Arg_Traits_T<CORBA::Long>
# pragma instantiate TAO::Arg_Traits_T<CORBA::UShort>
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index db0e4747a33..017c67d5dbf 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -1592,10 +1592,6 @@ SOURCE=.\Object_Argument_T.h
# End Source File
# Begin Source File
-SOURCE=.\PortableServer\Object_Argument_T.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Object_KeyC.h
# End Source File
# Begin Source File
@@ -1800,10 +1796,6 @@ SOURCE=.\SArgument.h
# End Source File
# Begin Source File
-SOURCE=.\SArgument_T.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Seq_Out_T.h
# End Source File
# Begin Source File