summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-01 02:35:22 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-05-01 02:35:22 +0000
commitffaa5f192926b503aac1f141420e279b4b1d3bc9 (patch)
tree71b8b6118fe0a3aedebdf0bbb002801b57346142
parent17ad82f36e612d7c3272df2d31030d9fa443557a (diff)
downloadATCD-ffaa5f192926b503aac1f141420e279b4b1d3bc9.tar.gz
ChangeLogTag: Wed Apr 30 21:33:08 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref41
-rw-r--r--TAO/tao/ORB.cpp64
-rw-r--r--TAO/tao/TAO.dsp36
-rw-r--r--TAO/tao/Valuetype/AbstractBase.cpp4
-rw-r--r--TAO/tao/Valuetype/TAO_Valuetype.dsp36
-rw-r--r--TAO/tao/Valuetype/ValueBase.cpp (renamed from TAO/tao/ValueBase.cpp)6
-rw-r--r--TAO/tao/Valuetype/ValueBase.h (renamed from TAO/tao/ValueBase.h)21
-rw-r--r--TAO/tao/Valuetype/ValueBase.inl (renamed from TAO/tao/ValueBase.i)10
-rw-r--r--TAO/tao/Valuetype/ValueFactory.cpp (renamed from TAO/tao/ValueFactory.cpp)4
-rw-r--r--TAO/tao/Valuetype/ValueFactory.h (renamed from TAO/tao/ValueFactory.h)13
-rw-r--r--TAO/tao/Valuetype/ValueFactory.inl (renamed from TAO/tao/ValueFactory.i)0
-rw-r--r--TAO/tao/Valuetype/ValueFactory_Map.cpp (renamed from TAO/tao/ValueFactory_Map.cpp)6
-rw-r--r--TAO/tao/Valuetype/ValueFactory_Map.h (renamed from TAO/tao/ValueFactory_Map.h)27
-rw-r--r--TAO/tao/Valuetype/ValueFactory_Map.inl (renamed from TAO/tao/ValueFactory_Map.i)0
-rw-r--r--TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp32
-rw-r--r--TAO/tao/Valuetype/Valuetype_Adapter_Impl.h14
-rw-r--r--TAO/tao/Valuetype_Adapter.h17
-rw-r--r--TAO/tao/append.cpp19
-rw-r--r--TAO/tao/corba.h2
-rw-r--r--TAO/tao/skip.cpp19
20 files changed, 272 insertions, 99 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index a4be995641e..27abbd8b5ab 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,44 @@
+Wed Apr 30 21:33:08 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tao/ORB.cpp:
+ * tao/TAO.dsp:
+ * tao/Valuetype_Adapter.h:
+ * tao/append.cpp:
+ * tao/corba.h:
+ * tao/skip.cpp:
+ * tao/Valuetype/AbstractBase.cpp:
+ * tao/Valuetype/TAO_Valuetype.dsp
+ * tao/Valuetype/Valuetype_Adapter_Impl.cpp:
+ * tao/Valuetype/Valuetype_Adapter_Impl.h:
+
+ Exisiting files modified toward separating
+ valuetype-related files into a library.
+
+ * tao/Valuetype/ValueBase.cpp:
+ * tao/Valuetype/ValueBase.h:
+ * tao/Valuetype/ValueBase.inl:
+ * tao/Valuetype/ValueFactory.cpp:
+ * tao/Valuetype/ValueFactory.h:
+ * tao/Valuetype/ValueFactory.inl:
+ * tao/Valuetype/ValueFactory_Map.cpp:
+ * tao/Valuetype/ValueFactory_Map.h:
+ * tao/Valuetype/ValueFactory_Map.inl:
+
+ Files moved from TAO/tao and/or renamed.
+
+ * tao/ValueBase.cpp:
+ * tao/ValueBase.h:
+ * tao/ValueBase.i:
+ * tao/ValueFactory.cpp:
+ * tao/ValueFactory.h:
+ * tao/ValueFactory.i:
+ * tao/ValueFactory_Map.cpp:
+ * tao/ValueFactory_Map.h:
+ * tao/ValueFactory_Map.i:
+
+ Files removed from TAO and transferred to
+ the TAO_Valuetype library.
+
Wed Apr 30 18:11:05 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/ast/ast_interface.cpp:
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index fc9a8bee1a6..1ab9c0f2bb1 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -29,13 +29,12 @@ ACE_RCSID (tao,
#include "CodecFactory_ORBInitializer.h"
#include "TypeCodeFactory_Adapter.h"
+#include "Valuetype_Adapter.h"
#if TAO_HAS_INTERCEPTORS == 1
# include "PICurrent_ORBInitializer.h" /* @@ This should go away! */
#endif /* TAO_HAS_INTERCEPTORS == 1 */
-#include "ValueFactory_Map.h"
-
#include "Object_KeyC.h"
#include "ace/Dynamic_Service.h"
@@ -2045,47 +2044,80 @@ CORBA::ORB::register_value_factory (const char *repository_id,
// %! guard, and ACE_Null_Mutex in the map
// do _add_ref here not in map->rebind
- if (valuetype_factory_map_ == 0)
+ TAO_Valuetype_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_Valuetype_Adapter>::instance (
+ TAO_ORB_Core::valuetype_adapter_name ()
+ );
+
+ if (adapter == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ 0);
+ }
+
+ if (this->valuetype_factory_map_ == 0)
{
// currently the ValueFactory_Map is a singleton and not per ORB
// as in the OMG specs
- valuetype_factory_map_ = TAO_VALUEFACTORY_MAP::instance ();
- if (valuetype_factory_map_ == 0)
- ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ this->valuetype_factory_map_ =
+ adapter->valuefactory_map_instance ();
+
+ if (this->valuetype_factory_map_ == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ 0);
+ }
}
- int result = valuetype_factory_map_->rebind (repository_id, factory);
+ int result = adapter->vf_map_rebind (this->valuetype_factory_map_,
+ repository_id,
+ factory);
+
if (result == -1)
{
// Error on bind.
- ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ 0);
}
+
if (result == 1)
{
return factory; // previous factory was found
}
+
return 0;
}
void
CORBA::ORB::unregister_value_factory (const char * /* repository_id */
- ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_ENV_ARG_DECL)
{
- ACE_ERROR((LM_ERROR, ACE_TEXT ("(%N:%l) function not implemented\n")));
- // %! TODO
+ ACE_THROW ((CORBA::NO_IMPLEMENT ()));
}
CORBA::ValueFactory
CORBA::ORB::lookup_value_factory (const char *repository_id
- ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_ENV_ARG_DECL)
{
// %! guard
// do _add_ref here not in map->find
- if (valuetype_factory_map_)
+ if (this->valuetype_factory_map_)
{
- CORBA::ValueFactory factory;
- int result = valuetype_factory_map_->find (repository_id,
- factory);
+ TAO_Valuetype_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_Valuetype_Adapter>::instance (
+ TAO_ORB_Core::valuetype_adapter_name ()
+ );
+
+ if (adapter == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ 0);
+ }
+
+ CORBA::ValueFactory factory = 0;
+ int result = adapter->vf_map_find (this->valuetype_factory_map_,
+ repository_id,
+ factory);
if (result == -1)
{
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index 35b46d255d2..7365d886112 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -967,18 +967,6 @@ SOURCE=.\TypeCodeFactory_Adapter.cpp
# End Source File
# Begin Source File
-SOURCE=.\ValueBase.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory_Map.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\Valuetype_Adapter.cpp
# End Source File
# Begin Source File
@@ -1848,18 +1836,6 @@ SOURCE=.\TypeCodeFactory_Adapter.h
# End Source File
# Begin Source File
-SOURCE=.\ValueBase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory_Map.h
-# End Source File
-# Begin Source File
-
SOURCE=.\Valuetype_Adapter.h
# End Source File
# Begin Source File
@@ -2446,18 +2422,6 @@ SOURCE=.\Transport_Descriptor_Interface.inl
SOURCE=.\typecode.i
# End Source File
-# Begin Source File
-
-SOURCE=.\ValueBase.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ValueFactory_Map.i
-# End Source File
# End Group
# Begin Group "Resource files"
diff --git a/TAO/tao/Valuetype/AbstractBase.cpp b/TAO/tao/Valuetype/AbstractBase.cpp
index 9e9f29946be..e732bf846e4 100644
--- a/TAO/tao/Valuetype/AbstractBase.cpp
+++ b/TAO/tao/Valuetype/AbstractBase.cpp
@@ -1,10 +1,10 @@
// "$Id$"
#include "AbstractBase.h"
-#include "tao/ValueBase.h"
+#include "ValueBase.h"
+#include "ValueFactory.h"
#include "tao/Stub.h"
#include "tao/Profile.h"
-#include "tao/ValueFactory.h"
#include "tao/debug.h"
#if !defined (__ACE_INLINE__)
diff --git a/TAO/tao/Valuetype/TAO_Valuetype.dsp b/TAO/tao/Valuetype/TAO_Valuetype.dsp
index c70aaca1785..d2535c472c7 100644
--- a/TAO/tao/Valuetype/TAO_Valuetype.dsp
+++ b/TAO/tao/Valuetype/TAO_Valuetype.dsp
@@ -98,6 +98,18 @@ SOURCE=.\AbstractBase.cpp
# End Source File
# Begin Source File
+SOURCE=.\ValueBase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory_Map.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Valuetype_Adapter_Impl.cpp
# End Source File
# End Group
@@ -110,6 +122,18 @@ SOURCE=.\AbstractBase.h
# End Source File
# Begin Source File
+SOURCE=.\ValueBase.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory_Map.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Valuetype_Adapter_Impl.h
# End Source File
# Begin Source File
@@ -124,6 +148,18 @@ SOURCE=.\valuetype_export.h
SOURCE=.\AbstractBase.inl
# End Source File
+# Begin Source File
+
+SOURCE=.\ValueBase.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\ValueFactory_Map.inl
+# End Source File
# End Group
# Begin Group "Reosurce Files"
diff --git a/TAO/tao/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp
index 045a918d1c3..09149f7476a 100644
--- a/TAO/tao/ValueBase.cpp
+++ b/TAO/tao/Valuetype/ValueBase.cpp
@@ -13,15 +13,15 @@
//
// ============================================================================
+#include "ValueBase.h"
#include "tao/CDR.h"
#include "tao/ORB.h"
#include "tao/ORB_Core.h"
-#include "tao/ValueBase.h"
-#include "tao/ValueFactory.h"
+#include "ValueFactory.h"
#include "tao/debug.h"
#if !defined (__ACE_INLINE__)
-# include "tao/ValueBase.i"
+# include "ValueBase.inl"
#endif /* ! __ACE_INLINE__ */
ACE_RCSID (tao,
diff --git a/TAO/tao/ValueBase.h b/TAO/tao/Valuetype/ValueBase.h
index 0758baa01a7..aff9fb396f4 100644
--- a/TAO/tao/ValueBase.h
+++ b/TAO/tao/Valuetype/ValueBase.h
@@ -16,6 +16,7 @@
#include "ace/pre.h"
+#include "valuetype_export.h"
#include "tao/orbconf.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -27,6 +28,10 @@
#include "ace/Basic_Types.h" /* for ptr_arith_t */
#include "ace/Synch_T.h"
+#if defined (TAO_EXPORT_MACRO)
+#undef TAO_EXPORT_MACRO
+#endif
+#define TAO_EXPORT_MACRO TAO_Valuetype_Export
namespace CORBA
{
@@ -44,7 +49,7 @@ namespace CORBA
*
* @see CORBA 2.3 - Section 20.17.5
*/
- class TAO_Export ValueBase
+ class TAO_Valuetype_Export ValueBase
{
public:
typedef ValueBase* _ptr_type;
@@ -122,7 +127,7 @@ namespace CORBA
*
* @brief _var class for ValueBase
*/
- class TAO_Export ValueBase_var
+ class TAO_Valuetype_Export ValueBase_var
{
public:
ValueBase_var (void);
@@ -162,7 +167,7 @@ namespace CORBA
*
* _out class for CORBA::ValueBase
*/
- class TAO_Export ValueBase_out
+ class TAO_Valuetype_Export ValueBase_out
{
public:
ValueBase_out (CORBA::ValueBase *&);
@@ -186,7 +191,7 @@ namespace CORBA
*
* Default mix-in for reference count of a valuetype.
*/
- class TAO_Export DefaultValueRefCountBase
+ class TAO_Valuetype_Export DefaultValueRefCountBase
: public virtual ValueBase
{
public:
@@ -226,7 +231,7 @@ namespace CORBA
*
* @see CORBA 2.3 -- Section 15.3.4
*/
-class TAO_Export TAO_OBV_GIOP_Flags
+class TAO_Valuetype_Export TAO_OBV_GIOP_Flags
{
public:
static const CORBA::ULong Value_tag_base;
@@ -250,14 +255,14 @@ public:
static CORBA::Boolean is_end_tag (CORBA::ULong);
};
-TAO_Export CORBA::Boolean
+TAO_Valuetype_Export CORBA::Boolean
operator<< (TAO_OutputCDR&, const CORBA::ValueBase *);
-TAO_Export CORBA::Boolean
+TAO_Valuetype_Export CORBA::Boolean
operator>> (TAO_InputCDR&, CORBA::ValueBase *&);
#if defined (__ACE_INLINE__)
-# include "tao/ValueBase.i"
+# include "ValueBase.inl"
#endif /* __ACE_INLINE__*/
#include "ace/post.h"
diff --git a/TAO/tao/ValueBase.i b/TAO/tao/Valuetype/ValueBase.inl
index 5520bcc80bb..856382644e2 100644
--- a/TAO/tao/ValueBase.i
+++ b/TAO/tao/Valuetype/ValueBase.inl
@@ -8,14 +8,18 @@ ACE_INLINE void
CORBA::add_ref (CORBA::ValueBase *val)
{
if (val)
- val->_add_ref ();
+ {
+ val->_add_ref ();
+ }
}
ACE_INLINE void
CORBA::remove_ref (CORBA::ValueBase *val)
{
if (val)
- val->_remove_ref ();
+ {
+ val->_remove_ref ();
+ }
}
// ===========================================================
@@ -290,7 +294,7 @@ TAO_OBV_GIOP_Flags::is_value_tag (CORBA::ULong tag)
}
ACE_INLINE CORBA::Boolean
-TAO_OBV_GIOP_Flags:: has_codebase_url(CORBA::ULong tag)
+TAO_OBV_GIOP_Flags:: has_codebase_url (CORBA::ULong tag)
{
return (CORBA::Boolean) (tag & Codebase_url);
}
diff --git a/TAO/tao/ValueFactory.cpp b/TAO/tao/Valuetype/ValueFactory.cpp
index 6cf497f3750..f0c1e682fad 100644
--- a/TAO/tao/ValueFactory.cpp
+++ b/TAO/tao/Valuetype/ValueFactory.cpp
@@ -1,7 +1,7 @@
-#include "tao/ValueFactory.h"
+#include "ValueFactory.h"
#if !defined (__ACE_INLINE__)
-# include "tao/ValueFactory.i"
+# include "ValueFactory.inl"
#endif /* ! __ACE_INLINE__ */
diff --git a/TAO/tao/ValueFactory.h b/TAO/tao/Valuetype/ValueFactory.h
index 9d682aa227b..10292c05f68 100644
--- a/TAO/tao/ValueFactory.h
+++ b/TAO/tao/Valuetype/ValueFactory.h
@@ -15,6 +15,7 @@
#define TAO_VALUEFACTORY_H
#include "ace/pre.h"
+#include "valuetype_export.h"
#include "tao/corbafwd.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
@@ -25,11 +26,11 @@
namespace CORBA
{
- class TAO_Export ValueFactoryBase
+ class TAO_Valuetype_Export ValueFactoryBase
{
public:
- ValueFactoryBase ();
- virtual ~ValueFactoryBase ();
+ ValueFactoryBase (void);
+ virtual ~ValueFactoryBase (void);
// non-virtual is non-standard
void _add_ref (void);
@@ -47,14 +48,14 @@ namespace CORBA
private:
CORBA::ULong _tao_reference_count_;
TAO_SYNCH_MUTEX _tao_reference_count_lock_;
- }; // CORBA_ValueFactoryBase
+ };
/**
* @class ValueFactoryBase_var
*
* @brief _var class for ValueFactoryBase
*/
- class TAO_Export ValueFactoryBase_var
+ class TAO_Valuetype_Export ValueFactoryBase_var
{
public:
ValueFactoryBase_var (void);
@@ -112,7 +113,7 @@ namespace CORBA
#if defined (__ACE_INLINE__)
-# include "tao/ValueFactory.i"
+# include "ValueFactory.inl"
#endif /* __ACE_INLINE__) */
#include "ace/post.h"
diff --git a/TAO/tao/ValueFactory.i b/TAO/tao/Valuetype/ValueFactory.inl
index bbb6ad561fe..bbb6ad561fe 100644
--- a/TAO/tao/ValueFactory.i
+++ b/TAO/tao/Valuetype/ValueFactory.inl
diff --git a/TAO/tao/ValueFactory_Map.cpp b/TAO/tao/Valuetype/ValueFactory_Map.cpp
index d43b139f1c2..068e8c9c50e 100644
--- a/TAO/tao/ValueFactory_Map.cpp
+++ b/TAO/tao/Valuetype/ValueFactory_Map.cpp
@@ -1,8 +1,8 @@
-#include "tao/ValueFactory_Map.h"
-#include "tao/ValueFactory.h"
+#include "ValueFactory_Map.h"
+#include "ValueFactory.h"
#if !defined (__ACE_INLINE__)
-# include "tao/ValueFactory_Map.i"
+# include "ValueFactory_Map.inl"
#endif /* ! __ACE_INLINE__ */
diff --git a/TAO/tao/ValueFactory_Map.h b/TAO/tao/Valuetype/ValueFactory_Map.h
index 78ea7c3e915..c2b81528567 100644
--- a/TAO/tao/ValueFactory_Map.h
+++ b/TAO/tao/Valuetype/ValueFactory_Map.h
@@ -15,15 +15,15 @@
#define TAO_VALUEFACTORY_MAP_H
#include "ace/pre.h"
-#include "ace/Hash_Map_Manager_T.h"
+#include "tao/corbafwd.h"
+#include "tao/TAO_Singleton.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/TAO_Singleton.h"
+#include "ace/Hash_Map_Manager_T.h"
#include "ace/Synch.h"
-#include "tao/corbafwd.h"
class TAO_ValueFactory_Map
{
@@ -40,18 +40,21 @@ public:
* Returns -1 on failure, 0 on success and 1 if a previous factory
* is found (and returned in factory).
*/
- int rebind (const char *repo_id, CORBA::ValueFactory &factory);
+ int rebind (const char *repo_id,
+ CORBA::ValueFactory &factory);
/// Removes entry for repo_id from the map and sets factory to
/// the tied one.
- int unbind (const char *repo_id, CORBA::ValueFactory &factory);
+ int unbind (const char *repo_id,
+ CORBA::ValueFactory &factory);
/**
* Lookup a matching factory for repo_id.
* Invokes _add_ref () on the factory if found.
* Returns -1 on failure and 0 on success.
*/
- int find (const char *repo_id, CORBA::ValueFactory &factory);
+ int find (const char *repo_id,
+ CORBA::ValueFactory &factory);
void dump (void);
@@ -68,18 +71,18 @@ private:
}; /* TAO_ValueFactory_Map */
-// currently the ValueFactory_Map is a singleton and not per ORB
-// as in the OMG specs
+// Currently the ValueFactory_Map is a singleton and not per ORB
+// as in the OMG spec.
typedef TAO_Singleton<TAO_ValueFactory_Map, TAO_SYNCH_MUTEX>
TAO_VALUEFACTORY_MAP;
-TAO_SINGLETON_DECLARE (TAO_Singleton,
- TAO_ValueFactory_Map,
- TAO_SYNCH_MUTEX)
+TAO_VALUETYPE_SINGLETON_DECLARE (TAO_Singleton,
+ TAO_ValueFactory_Map,
+ TAO_SYNCH_MUTEX)
#if defined (__ACE_INLINE__)
-# include "tao/ValueFactory_Map.i"
+# include "ValueFactory_Map.inl"
#endif /* __ACE_INLINE__) */
#include "ace/post.h"
diff --git a/TAO/tao/ValueFactory_Map.i b/TAO/tao/Valuetype/ValueFactory_Map.inl
index cfa1da318d3..cfa1da318d3 100644
--- a/TAO/tao/ValueFactory_Map.i
+++ b/TAO/tao/Valuetype/ValueFactory_Map.inl
diff --git a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp
index eea8bb2a77d..5990001b91b 100644
--- a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp
+++ b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.cpp
@@ -2,6 +2,8 @@
#include "Valuetype_Adapter_Impl.h"
#include "AbstractBase.h"
+#include "ValueBase.h"
+#include "ValueFactory_Map.h"
#include "tao/ORB_Core.h"
ACE_RCSID (Valuetype,
@@ -19,6 +21,36 @@ TAO_Valuetype_Adapter_Impl::abstractbase_to_object (
{
return p->_to_object ();
}
+
+CORBA::ULong
+TAO_Valuetype_Adapter_Impl::type_info_single (void) const
+{
+ return TAO_OBV_GIOP_Flags::Type_info_single;
+}
+
+TAO_ValueFactory_Map *
+TAO_Valuetype_Adapter_Impl::valuefactory_map_instance (void)
+{
+ return TAO_VALUEFACTORY_MAP::instance ();
+}
+
+int
+TAO_Valuetype_Adapter_Impl::vf_map_rebind (TAO_ValueFactory_Map *map,
+ const char *repo_id,
+ CORBA::ValueFactory &factory)
+{
+ return map->rebind (repo_id,
+ factory);
+}
+
+int
+TAO_Valuetype_Adapter_Impl::vf_map_find (TAO_ValueFactory_Map *map,
+ const char *repo_id,
+ CORBA::ValueFactory &factory)
+{
+ return map->find (repo_id,
+ factory);
+}
// *********************************************************************
diff --git a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h
index c46489e4da7..8a7ca834c1c 100644
--- a/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h
+++ b/TAO/tao/Valuetype/Valuetype_Adapter_Impl.h
@@ -39,8 +39,20 @@ public:
virtual ~TAO_Valuetype_Adapter_Impl (void);
virtual CORBA::Object_ptr abstractbase_to_object (
- CORBA::AbstractBase_ptr p
+ CORBA::AbstractBase_ptr
);
+
+ virtual CORBA::ULong type_info_single (void) const;
+
+ virtual TAO_ValueFactory_Map *valuefactory_map_instance (void);
+
+ virtual int vf_map_rebind (TAO_ValueFactory_Map *,
+ const char *,
+ CORBA::ValueFactory &);
+
+ virtual int vf_map_find (TAO_ValueFactory_Map *,
+ const char *,
+ CORBA::ValueFactory &);
// Used to force the initialization of the ORB code.
static int Initializer (void);
diff --git a/TAO/tao/Valuetype_Adapter.h b/TAO/tao/Valuetype_Adapter.h
index 80b7ea5b21f..9c9c4b8f5a6 100644
--- a/TAO/tao/Valuetype_Adapter.h
+++ b/TAO/tao/Valuetype_Adapter.h
@@ -16,12 +16,15 @@
#include "ace/pre.h"
#include "ace/Service_Object.h"
-#include "tao/corbafwd.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "tao/corbafwd.h"
+
+class TAO_ValueFactory_Map;
+
/**
* @class TAO_Valuetype_Adapter
*
@@ -39,6 +42,18 @@ public:
virtual CORBA::Object_ptr abstractbase_to_object (
CORBA::AbstractBase_ptr p
) = 0;
+
+ virtual CORBA::ULong type_info_single (void) const = 0;
+
+ virtual TAO_ValueFactory_Map * valuefactory_map_instance (void) = 0;
+
+ virtual int vf_map_rebind (TAO_ValueFactory_Map *,
+ const char *,
+ CORBA::ValueFactory &) = 0;
+
+ virtual int vf_map_find (TAO_ValueFactory_Map *,
+ const char *,
+ CORBA::ValueFactory &) = 0;
};
#include "ace/post.h"
diff --git a/TAO/tao/append.cpp b/TAO/tao/append.cpp
index 8bec4e4467b..e380ddeb30f 100644
--- a/TAO/tao/append.cpp
+++ b/TAO/tao/append.cpp
@@ -23,8 +23,11 @@
#include "tao/CDR.h"
#include "tao/Environment.h"
#include "tao/Any.h"
-#include "tao/ValueBase.h"
#include "tao/debug.h"
+#include "tao/Valuetype_Adapter.h"
+#include "tao/ORB_Core.h"
+
+#include "ace/Dynamic_Service.h"
ACE_RCSID (tao,
append,
@@ -1190,12 +1193,23 @@ TAO_Marshal_Value::append (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_STOP;
}
+ TAO_Valuetype_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_Valuetype_Adapter>::instance (
+ TAO_ORB_Core::valuetype_adapter_name ()
+ );
+
+ if (adapter == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ CORBA::TypeCode::TRAVERSE_STOP);
+ }
+
if (value_tag == 0) // Null value type pointer.
{
//We are done.
return retval;
}
- else if (value_tag & TAO_OBV_GIOP_Flags::Type_info_single)
+ else if (value_tag & adapter->type_info_single ())
{
// Append repository id which is of type string.
dest->append_string (*src);
@@ -1210,6 +1224,7 @@ TAO_Marshal_Value::append (CORBA::TypeCode_ptr tc,
// Handle our base valuetype if any.
param = tc->concrete_base_type (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
+
if (param->kind () != CORBA::tk_null)
{
retval = this->append (param.in (),
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 0070c100439..0de306566b4 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -51,8 +51,6 @@
#include "tao/CurrentC.h"
#include "tao/BoundsC.h"
-#include "tao/ValueBase.h"
-#include "tao/ValueFactory.h"
#include "tao/PolicyC.h"
#include "tao/ServicesC.h"
#include "tao/DomainC.h"
diff --git a/TAO/tao/skip.cpp b/TAO/tao/skip.cpp
index d66e3a71bfd..b62e2b7c114 100644
--- a/TAO/tao/skip.cpp
+++ b/TAO/tao/skip.cpp
@@ -23,8 +23,11 @@
#include "tao/CDR.h"
#include "tao/Any.h"
#include "tao/Environment.h"
-#include "tao/ValueBase.h"
#include "tao/debug.h"
+#include "tao/Valuetype_Adapter.h"
+#include "tao/ORB_Core.h"
+
+#include "ace/Dynamic_Service.h"
ACE_RCSID (tao,
@@ -948,12 +951,23 @@ TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc,
return CORBA::TypeCode::TRAVERSE_STOP;
}
+ TAO_Valuetype_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_Valuetype_Adapter>::instance (
+ TAO_ORB_Core::valuetype_adapter_name ()
+ );
+
+ if (adapter == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),
+ CORBA::TypeCode::TRAVERSE_STOP);
+ }
+
if (value_tag == 0) // Null value type pointer.
{
//We are done.
return retval;
}
- else if (value_tag & TAO_OBV_GIOP_Flags::Type_info_single)
+ else if (value_tag & adapter->type_info_single ())
{
// Skip a single repository id which is of type string.
stream->skip_string ();
@@ -968,6 +982,7 @@ TAO_Marshal_Value::skip (CORBA::TypeCode_ptr tc,
// Handle our base valuetype if any.
param = tc->concrete_base_type (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
+
if (param->kind () != CORBA::tk_null)
{
retval = this->skip (param.in (), stream ACE_ENV_ARG_PARAMETER);