summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-07-18 20:03:46 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-07-18 20:03:46 +0000
commitb2353b5f36ffef1b84b166ba052ce0d0be6ff6a0 (patch)
tree7203e8bd137fc71b8cb8f63fc022fade6a9c61f6
parent3304168cc5fb927f4099c46ac2c176d5b3659f81 (diff)
downloadATCD-b2353b5f36ffef1b84b166ba052ce0d0be6ff6a0.tar.gz
ChangeLogTag: Mon Jul 18 20:02:59 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog31
-rw-r--r--TAO/TAO_IDL/be/be_global.cpp21
-rw-r--r--TAO/TAO_IDL/be/be_visitor_arg_traits.cpp11
-rw-r--r--TAO/TAO_IDL/be_include/be_global.h7
-rw-r--r--TAO/docs/compiler.html14
-rw-r--r--TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp107
-rw-r--r--TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h33
-rw-r--r--TAO/tao/AnyTypeCode_Adapter.h46
-rw-r--r--TAO/tao/tao.mpc2
9 files changed, 265 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 42412cf0327..12ed7ad617d 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,34 @@
+Mon Jul 18 20:02:59 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_arg_traits.cpp:
+ * TAO_IDL/be/be_global.cpp:
+ * TAO_IDL/be_include/be_global.h:
+
+ Added new option to IDL compiler -Gata, which
+ generates arg traits instantiations using the
+ AnyTypeCode_Adapter version of the last template
+ parameter (if Any support is not suppressed). The
+ option is used when processing IDL for the
+ sequences of basic types, so their arg traits
+ may be included by application whether or not
+ the application is suppressing Any support.
+
+ * tao/tao.mpc:
+
+ Added the new option to the basic sequence PIDL files.
+
+ * tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h:
+ * tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp:
+ * tao/AnyTypeCode_Adapter.h:
+
+ Added new overloads to the AnyTypeCode_Adapter and
+ AnyTypeCode_Adapter_Impl classes, with the basic
+ type sequences as the second argument.
+
+ * docs/compiler.html:
+
+ Documented the new IDL compiler option.
+
Mon Jul 18 19:01:17 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com>
* MPC/config/ifr_client_skel.mpb:
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp
index 4908cb9450d..8d8a3e8c4a4 100644
--- a/TAO/TAO_IDL/be/be_global.cpp
+++ b/TAO/TAO_IDL/be/be_global.cpp
@@ -148,7 +148,8 @@ BE_GlobalData::BE_GlobalData (void)
tab_size_ (2),
alt_mapping_ (false),
in_facet_servant_ (false),
- gen_arg_traits_ (true)
+ gen_arg_traits_ (true),
+ gen_anytypecode_adapter_ (false)
{
}
@@ -2519,6 +2520,18 @@ BE_GlobalData::gen_arg_traits (bool val)
this->gen_arg_traits_ = val;
}
+bool
+BE_GlobalData::gen_anytypecode_adapter (void) const
+{
+ return this->gen_anytypecode_adapter_;
+}
+
+void
+BE_GlobalData::gen_anytypecode_adapter (bool val)
+{
+ this->gen_anytypecode_adapter_ = val;
+}
+
unsigned long
BE_GlobalData::tab_size (void) const
{
@@ -3264,6 +3277,12 @@ BE_GlobalData::parse_args (long &i, char **av)
}
}
}
+ else if (av[i][2] == 'a' && av[i][3] == 't' && av[i][4] == 'a')
+ {
+ // Generate the AnyTypeCode_Adapter version of the Any insert
+ // policy - used with the sequences of basic types in the ORB.
+ be_global->gen_anytypecode_adapter (true);
+ }
else
{
ACE_ERROR ((
diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
index cfabe5ad742..8f44ee9caac 100644
--- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp
@@ -170,7 +170,7 @@ be_visitor_arg_traits::visit_interface (be_interface *node)
<< "TAO::Objref_Traits<" << node->name () << ">";
}
- *os << "," << be_nl << this->insert_policy()
+ *os << "," << be_nl << this->insert_policy ()
<< be_uidt_nl
<< ">" << be_uidt << be_uidt << be_uidt << be_uidt_nl
<< "{" << be_nl
@@ -1240,7 +1240,14 @@ be_visitor_arg_traits::insert_policy (void)
{
if (be_global->any_support ())
{
- return "TAO::Any_Insert_Policy_Stream";
+ if (be_global->gen_anytypecode_adapter ())
+ {
+ return "TAO::Any_Insert_Policy_AnyTypeCode_Adapter";
+ }
+ else
+ {
+ return "TAO::Any_Insert_Policy_Stream";
+ }
}
else
{
diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h
index 15e9a359a38..80c01149d15 100644
--- a/TAO/TAO_IDL/be_include/be_global.h
+++ b/TAO/TAO_IDL/be_include/be_global.h
@@ -853,6 +853,9 @@ public:
bool gen_arg_traits (void) const;
void gen_arg_traits (bool val);
+ bool gen_anytypecode_adapter (void) const;
+ void gen_anytypecode_adapter (bool val);
+
unsigned long tab_size (void) const;
void tab_size (unsigned long val);
@@ -1213,6 +1216,10 @@ private:
/// Are we generating arg traits template instantiations?
bool gen_arg_traits_;
+
+ /// Generating arg traits in the ORB for the basic type
+ /// sequences requires the AnyTypeCode_Adapter class.
+ bool gen_anytypecode_adapter_;
};
#endif /* _BE_GLOBAL_H */
diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html
index c3418aecc26..604920dad12 100644
--- a/TAO/docs/compiler.html
+++ b/TAO/docs/compiler.html
@@ -987,6 +987,20 @@ also receives other options that are specific to it.<p>
with the <tt>gen_ostream</tt> feature turned on.</td>
</tr>
+ <tr><a name="Gata">
+ <td><tt>-Gata</tt></td>
+
+ <td>Generate the AnyTypeCode_Adapter version of the Any insert policy</td>
+ <td>When generating arg traits instantiations, this option forces
+ (if Any support in general is not suppressed) the generation
+ of <code>Any_Insert_Policy_AnyTypeCode_Adapter</code> for the
+ last template parameter. This option is used when generating
+ arg traits for the sequences of basic types in the ORB, so
+ their arg traits may be included in files generated from
+ application IDL whether Any support is suppressed in the
+ application IDL processing or not.</td>
+ </tr>
+
<tr><a name="Gsv">
<td><tt>-Gsv</tt></td>
diff --git a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
index be009e7905e..0fbb6b7ce1b 100644
--- a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
+++ b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp
@@ -7,6 +7,22 @@
#include "tao/AnyTypeCode/PolicyA.h"
#include "tao/AnyTypeCode/Any.h"
+#include "tao/AnyTypeCode/BooleanSeqA.h"
+#include "tao/AnyTypeCode/OctetSeqA.h"
+#include "tao/AnyTypeCode/CharSeqA.h"
+#include "tao/AnyTypeCode/WCharSeqA.h"
+#include "tao/AnyTypeCode/ShortSeqA.h"
+#include "tao/AnyTypeCode/UShortSeqA.h"
+#include "tao/AnyTypeCode/LongSeqA.h"
+#include "tao/AnyTypeCode/ULongSeqA.h"
+#include "tao/AnyTypeCode/LongLongSeqA.h"
+#include "tao/AnyTypeCode/ULongLongSeqA.h"
+#include "tao/AnyTypeCode/FloatSeqA.h"
+#include "tao/AnyTypeCode/DoubleSeqA.h"
+#include "tao/AnyTypeCode/LongDoubleSeqA.h"
+#include "tao/AnyTypeCode/StringSeqA.h"
+#include "tao/AnyTypeCode/WStringSeqA.h"
+
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
#define STANDARD_EXCEPTION_LIST \
@@ -172,6 +188,97 @@ TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, ACE_OutputCDR::
(*any) <<= value;
}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::BooleanSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::OctetSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::CharSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::WCharSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::ShortSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::UShortSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::LongSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::ULongSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::LongLongSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::ULongLongSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::FloatSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::DoubleSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::LongDoubleSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::StringSeq & value)
+{
+ (*any) <<= value;
+}
+
+void
+TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const CORBA::WStringSeq & value)
+{
+ (*any) <<= value;
+}
+
int
TAO_AnyTypeCode_Adapter_Impl::Initializer (void)
{
diff --git a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h
index f2cac1af6ca..aea65d5d859 100644
--- a/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h
+++ b/TAO/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef TAO_ANYTYPECODE_ADAPTER_IMPL_H
#define TAO_ANYTYPECODE_ADAPTER_IMPL_H
@@ -123,6 +122,36 @@ ANYTYPECODE__EXCEPTION_LIST
virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_octet value);
virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_boolean value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::BooleanSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::OctetSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::CharSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::WCharSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ShortSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::UShortSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongLongSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongLongSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::FloatSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::DoubleSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongDoubleSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::StringSeq & value);
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::WStringSeq & value);
};
@@ -134,7 +163,5 @@ static int TAO_Requires_TAO_AnyTypeCode_Adapter_Impl =
TAO_END_VERSIONED_NAMESPACE_DECL
-
-
#include /**/ "ace/post.h"
#endif /* TAO_ANYTYPECODE_ADAPTER_IMPL_H */
diff --git a/TAO/tao/AnyTypeCode_Adapter.h b/TAO/tao/AnyTypeCode_Adapter.h
index 68b756bc8d3..a52ae043ef5 100644
--- a/TAO/tao/AnyTypeCode_Adapter.h
+++ b/TAO/tao/AnyTypeCode_Adapter.h
@@ -39,6 +39,22 @@ namespace CORBA
class Policy;
typedef Policy *Policy_ptr;
+
+ class BooleanSeq;
+ class OctetSeq;
+ class CharSeq;
+ class WCharSeq;
+ class ShortSeq;
+ class UShortSeq;
+ class LongSeq;
+ class ULongSeq;
+ class LongLongSeq;
+ class ULongLongSeq;
+ class FloatSeq;
+ class DoubleSeq;
+ class LongDoubleSeq;
+ class StringSeq;
+ class WStringSeq;
}
/**
@@ -136,6 +152,36 @@ ANYTYPECODE__EXCEPTION_LIST
virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_octet value) = 0;
virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_boolean value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::BooleanSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::OctetSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::CharSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::WCharSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ShortSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::UShortSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongLongSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongLongSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::FloatSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::DoubleSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::LongDoubleSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::StringSeq & value) = 0;
+
+ virtual void insert_into_any (CORBA::Any * any, const CORBA::WStringSeq & value) = 0;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc
index 2681f8ca93f..3318978a531 100644
--- a/TAO/tao/tao.mpc
+++ b/TAO/tao/tao.mpc
@@ -44,7 +44,7 @@ project(TAO_Core_idl) : tao_versioning_idl_defaults, gen_ostream, install, pidl_
}
IDL_Files {
- idlflags += -Sci -Gse
+ idlflags += -Sci -Gse -Gata
BooleanSeq.pidl >> AnyTypeCode/BooleanSeqA.h AnyTypeCode/BooleanSeqA.cpp
CharSeq.pidl >> AnyTypeCode/CharSeqA.h AnyTypeCode/CharSeqA.cpp
DoubleSeq.pidl >> AnyTypeCode/DoubleSeqA.h AnyTypeCode/DoubleSeqA.cpp