diff options
author | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-03-01 11:28:43 +0000 |
---|---|---|
committer | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-03-01 11:28:43 +0000 |
commit | 7147fdaf04713e3bdfe97e7c1691a640529c7317 (patch) | |
tree | 8670e0ce86a3991484de3aa8fb315c15e313bd18 | |
parent | 8e4283a21c41ef60c82ad1d83170fe8453be4c98 (diff) | |
download | ATCD-7147fdaf04713e3bdfe97e7c1691a640529c7317.tar.gz |
Thu Mar 1 11:27:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
-rw-r--r-- | TAO/ChangeLog | 10 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/Any_Impl.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Valuetype/Valuetype_Adapter_Impl.h | 2 | ||||
-rw-r--r-- | TAO/tao/Valuetype_Adapter.h | 2 |
5 files changed, 23 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 6cb4895effd..dec2aba9722 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Thu Mar 1 11:27:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com> + + * tao/Valuetype_Adapter.h: + * tao/AnyTypeCode/Any_Impl.cpp: + * tao/Valuetype/Valuetype_Adapter_Impl.h: + * tao/Valuetype/Valuetype_Adapter_Impl.cpp: + Removed dependancy on ValueBase.h within Any_Impl.cpp using the adapter. + Wed Feb 29 16:30:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com> * TAO_IDL/be/be_visitor_typecode/value_typecode.cpp: @@ -9,7 +17,7 @@ Wed Feb 29 16:30:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot co extracted (as the tc was wrong at extraction, or the embedded Any_Impl_T<base *> class wouldn't dynamic_cast to the Any_Impl_T<derived *>. - * tao/AnyTypeCode/Amy_Impl.cpp: + * tao/AnyTypeCode/Any_Impl.cpp: When marshaling the any, If it is holding a valueType, send the fully derived typecode of the type being held instead of the Any embedded typecode. This effectivly takes over from the change diff --git a/TAO/tao/AnyTypeCode/Any_Impl.cpp b/TAO/tao/AnyTypeCode/Any_Impl.cpp index 84e3e71903a..1caab33a6e2 100644 --- a/TAO/tao/AnyTypeCode/Any_Impl.cpp +++ b/TAO/tao/AnyTypeCode/Any_Impl.cpp @@ -4,7 +4,8 @@ #include "tao/AnyTypeCode/Any_Impl.h" #include "tao/AnyTypeCode/TypeCode.h" #include "tao/AnyTypeCode/Marshal.h" -#include "tao/Valuetype/ValueBase.h" +#include "tao/ORB_Core.h" +#include "tao/Valuetype_Adapter.h" #include "tao/CORBA_String.h" #include "tao/SystemException.h" @@ -38,7 +39,9 @@ TAO::Any_Impl::marshal (TAO_OutputCDR &cdr) // the type we are marshaling NOT the // typecode of the base pointer that may // have been inserted into the any. - if (cdr << vb->_tao_type () == 0) + if (cdr << TAO_ORB_Core_instance () + ->valuetype_adapter() + ->derived_type (vb) == 0) { return false; } diff --git a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp index 74002deaf23..b6d7186c006 100644 --- a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp +++ b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp @@ -97,4 +97,9 @@ TAO_Valuetype_Adapter_Impl::vf_map_find (const char *repo_id) return factory; } +CORBA::TypeCode_ptr TAO_Valuetype_Adapter_Impl::derived_type (CORBA::ValueBase *vb) +{ + return vb->_tao_type (); +} + TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h index 55a6b72d1ba..23b01ad5b8f 100644 --- a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h +++ b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h @@ -66,6 +66,8 @@ public: virtual CORBA::ValueFactory vf_map_find (const char *); + virtual CORBA::TypeCode_ptr derived_type (CORBA::ValueBase *); + private: TAO_ValueFactory_Map map_; }; diff --git a/TAO/tao/Valuetype_Adapter.h b/TAO/tao/Valuetype_Adapter.h index 4328567f313..10b72c07c2a 100644 --- a/TAO/tao/Valuetype_Adapter.h +++ b/TAO/tao/Valuetype_Adapter.h @@ -77,6 +77,8 @@ public: virtual int vf_map_unbind (const char *) = 0; virtual CORBA::ValueFactory vf_map_find (const char *) = 0; + + virtual CORBA::TypeCode_ptr derived_type (CORBA::ValueBase *) = 0; }; TAO_END_VERSIONED_NAMESPACE_DECL |