diff options
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/Makefile | 396 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 103 | ||||
-rw-r--r-- | TAO/tao/ORB.h | 35 | ||||
-rw-r--r-- | TAO/tao/ValueBase.cpp | 259 | ||||
-rw-r--r-- | TAO/tao/ValueBase.h | 176 | ||||
-rw-r--r-- | TAO/tao/ValueBase.i | 175 | ||||
-rw-r--r-- | TAO/tao/ValueFactory.cpp | 31 | ||||
-rw-r--r-- | TAO/tao/ValueFactory.h | 94 | ||||
-rw-r--r-- | TAO/tao/ValueFactory.i | 26 | ||||
-rw-r--r-- | TAO/tao/ValueFactory_Map.cpp | 132 | ||||
-rw-r--r-- | TAO/tao/ValueFactory_Map.h | 77 | ||||
-rw-r--r-- | TAO/tao/ValueFactory_Map.i | 1 | ||||
-rw-r--r-- | TAO/tao/corba.h | 2 | ||||
-rw-r--r-- | TAO/tao/corbafwd.h | 21 | ||||
-rw-r--r-- | TAO/tao/orbconf.h | 9 |
15 files changed, 1509 insertions, 28 deletions
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index 07960a9807d..f464b75d078 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -85,6 +85,9 @@ ORB_CORE_FILES = \ MProfile \ Stub \ Typecode \ + ValueBase \ + ValueFactory \ + ValueFactory_Map \ CDR \ Client_Strategy_Factory \ Connect \ @@ -6032,7 +6035,6 @@ realclean: $(TAO_ROOT)/tao/Object.i \ $(TAO_ROOT)/tao/Typecode.h \ $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ $(TAO_ROOT)/tao/NVList.h \ $(TAO_ROOT)/tao/Any.h \ $(TAO_ROOT)/tao/CDR.h \ @@ -6171,6 +6173,8 @@ realclean: $(TAO_ROOT)/tao/Context.h \ $(TAO_ROOT)/tao/Context.i \ $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/ValueFactory_Map.h \ + $(TAO_ROOT)/tao/ValueFactory_Map.i \ $(TAO_ROOT)/tao/Timeprobe.h \ $(ACE_ROOT)/ace/Timeprobe.h .obj/PolicyC.o .obj/PolicyC.so .shobj/PolicyC.o .shobj/PolicyC.so: PolicyC.cpp \ @@ -6597,8 +6601,9 @@ realclean: $(TAO_ROOT)/tao/Environment.i \ $(TAO_ROOT)/tao/Object.h \ $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Any.i TimeBaseC.i \ - TimeBaseS.h TimeBaseS_T.h TimeBaseS_T.i TimeBaseS_T.cpp TimeBaseS.i + $(TAO_ROOT)/tao/Any.i \ + TimeBaseC.i TimeBaseS.h TimeBaseS_T.h TimeBaseS_T.i TimeBaseS_T.cpp \ + TimeBaseS.i .obj/TimeBaseS.o .obj/TimeBaseS.so .shobj/TimeBaseS.o .shobj/TimeBaseS.so: TimeBaseS.cpp TimeBaseS.h TimeBaseC.h \ $(TAO_ROOT)/tao/Any.h \ $(TAO_ROOT)/tao/CDR.h \ @@ -6676,8 +6681,8 @@ realclean: $(TAO_ROOT)/tao/Environment.i \ $(TAO_ROOT)/tao/Object.h \ $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Any.i TimeBaseC.i \ - TimeBaseS_T.h TimeBaseS_T.i TimeBaseS_T.cpp TimeBaseS.i + $(TAO_ROOT)/tao/Any.i \ + TimeBaseC.i TimeBaseS_T.h TimeBaseS_T.i TimeBaseS_T.cpp TimeBaseS.i .obj/Principal.o .obj/Principal.so .shobj/Principal.o .shobj/Principal.so: Principal.cpp \ $(TAO_ROOT)/tao/Principal.h \ $(TAO_ROOT)/tao/corbafwd.h \ @@ -7510,6 +7515,384 @@ realclean: $(TAO_ROOT)/tao/Sequence.i \ $(TAO_ROOT)/tao/Principal.i \ $(TAO_ROOT)/tao/debug.h +.obj/ValueBase.o .obj/ValueBase.so .shobj/ValueBase.o .shobj/ValueBase.so: ValueBase.cpp \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/Policy_Manager.i \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/IIOP_Connector.h \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/Connect.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i +.obj/ValueFactory.o .obj/ValueFactory.so .shobj/ValueFactory.o .shobj/ValueFactory.so: ValueFactory.cpp \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/ValueFactory.i +.obj/ValueFactory_Map.o .obj/ValueFactory_Map.so .shobj/ValueFactory_Map.o .shobj/ValueFactory_Map.so: ValueFactory_Map.cpp \ + $(TAO_ROOT)/tao/ValueFactory_Map.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/ValueFactory_Map.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(TAO_ROOT)/tao/ORB.i .obj/CDR.o .obj/CDR.so .shobj/CDR.o .shobj/CDR.so: CDR.cpp \ $(TAO_ROOT)/tao/Timeprobe.h \ $(ACE_ROOT)/ace/Timeprobe.h \ @@ -9973,7 +10356,8 @@ realclean: $(TAO_ROOT)/tao/CurrentC.i \ $(TAO_ROOT)/tao/CDR.h \ $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.i + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h .obj/IOR_LookupTable.o .obj/IOR_LookupTable.so .shobj/IOR_LookupTable.o .shobj/IOR_LookupTable.so: IOR_LookupTable.cpp \ $(TAO_ROOT)/tao/IOR_LookupTable.h \ $(ACE_ROOT)/ace/Synch_T.h \ diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 29f6d891337..7a0c1a38f2e 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -33,6 +33,10 @@ #include "tao/Object_Adapter.h" #include "tao/POA.h" #include "tao/Request.h" +#ifdef TAO_HAS_VALUETYPE +# include "tao/ValueFactory_Map.h" +#endif /* TAO_HAS_VALUETYPE */ + #if !defined (__ACE_INLINE__) # include "tao/ORB.i" @@ -134,6 +138,9 @@ CORBA_ORB::CORBA_ORB (TAO_ORB_Core* orb_core) event_service_ (CORBA_Object::_nil ()), trading_service_ (CORBA_Object::_nil ()), orb_core_ (orb_core), +# ifdef TAO_HAS_VALUETYPE + valuetype_factory_map_ (0), +# endif /* TAO_HAS_VALUETYPE */ use_omg_ior_format_ (1), optimize_collocation_objects_ (1) { @@ -180,6 +187,10 @@ CORBA_ORB::~CORBA_ORB (void) CORBA::release (this->event_service_); if (!CORBA::is_nil (this->trading_service_)) CORBA::release (this->trading_service_); +# ifdef TAO_HAS_VALUETYPE + // delete valuetype_factory_map_; + // not really, its a singleton +# endif /* TAO_HAS_VALUETYPE */ delete this->cond_become_leader_; } @@ -647,8 +658,8 @@ CORBA_ORB::multicast_query (char *buf, // Length of data to be sent. This is sent as a header. CORBA::Short data_len = - ACE_HTONS (sizeof (ACE_UINT16) - + ACE_OS::strlen (service_name)); + ACE_HTONS (sizeof (ACE_UINT16) + + ACE_OS::strlen (service_name)); // Vector to be sent. const int iovcnt = 3; @@ -734,7 +745,7 @@ CORBA_ORB::multicast_query (char *buf, } } - // We don't need the dgram or acceptor anymore. + // We don't need the dgram or acceptor anymore. dgram.close (); acceptor.close (); @@ -1714,7 +1725,7 @@ CORBA_ORB::_tao_find_in_IOR_table (ACE_CString &object_id, // The following functions are not implemented - they just throw // CORBA::NO_IMPLEMENT. -void +void CORBA_ORB::create_named_value (CORBA::NamedValue_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1722,7 +1733,7 @@ CORBA_ORB::create_named_value (CORBA::NamedValue_ptr &, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::create_exception_list (CORBA::ExceptionList_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1730,7 +1741,7 @@ CORBA_ORB::create_exception_list (CORBA::ExceptionList_ptr &, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::create_context_list (CORBA::ContextList_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1738,7 +1749,7 @@ CORBA_ORB::create_context_list (CORBA::ContextList_ptr &, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::get_default_context (CORBA::Context_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1746,7 +1757,7 @@ CORBA_ORB::get_default_context (CORBA::Context_ptr &, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::create_environment (CORBA::Environment_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1754,7 +1765,7 @@ CORBA_ORB::create_environment (CORBA::Environment_ptr &, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq, CORBA_Environment &ACE_TRY_ENV) { @@ -1762,7 +1773,7 @@ CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::send_multiple_requests_deferred (const CORBA_ORB_RequestSeq, CORBA_Environment &ACE_TRY_ENV) { @@ -1770,7 +1781,7 @@ CORBA_ORB::send_multiple_requests_deferred (const CORBA_ORB_RequestSeq, CORBA::COMPLETED_NO)); } -void +void CORBA_ORB::get_next_response (CORBA_Request_ptr &, CORBA_Environment &ACE_TRY_ENV) { @@ -1778,7 +1789,7 @@ CORBA_ORB::get_next_response (CORBA_Request_ptr &, CORBA::COMPLETED_NO)); } -CORBA::Boolean +CORBA::Boolean CORBA_ORB::poll_next_response (CORBA_Environment &ACE_TRY_ENV) { ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, @@ -1853,6 +1864,74 @@ operator>>(TAO_InputCDR& cdr, TAO_opaque& x) return cdr.good_bit (); } +// ************************************************************* +// Valuetype factory operations +// ************************************************************* + +#ifdef TAO_HAS_VALUETYPE + +CORBA::ValueFactory_ptr +CORBA_ORB::register_value_factory ( + const char *repository_id, + CORBA::ValueFactory_ptr factory, + CORBA_Environment &ACE_TRY_ENV) +{ +// %! guard, and ACE_Null_Mutex in the map +// do _add_ref here not in map->rebind + + if (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); + } + + int result = valuetype_factory_map_->rebind (repository_id, factory); + if (result == -1) + { + // Error on bind. + 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, + CORBA_Environment &ACE_TRY_ENV) +{ + ACE_ERROR((LM_ERROR, "(%N:%l) function not implemented\n")); + // %! TODO +} + +CORBA::ValueFactory_ptr +CORBA_ORB::lookup_value_factory (const char *repository_id, + CORBA_Environment &ACE_TRY_ENV) +{ +// %! guard +// do _add_ref here not in map->find + if (valuetype_factory_map_) + { + CORBA::ValueFactory_ptr factory; + int result = valuetype_factory_map_->find (repository_id, factory); + if (result == -1) + factory = 0; // %! raise exception ! + return factory; + } + else + { + return 0; // %! raise exception ! + } +} + +#endif /* TAO_HAS_VALUETYPE */ + + // **************************************************************** #define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, TAO_Cached_Connector_Lock> diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index cacd02a72e9..f8147d8500d 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -69,6 +69,10 @@ class TAO_Server_Strategy_Factory; class TAO_ORB_Parameters; class TAO_InputCDR; class TAO_OutputCDR; +#ifdef TAO_HAS_VALUETYPE +class TAO_ValueFactory_Map; +#endif /* TAO_HAS_VALUETYPE */ + // The new (POA) base class for servants. class TAO_ServantBase; @@ -263,6 +267,20 @@ public: // this is typically eventually given to <string_to_object()> as an // argument. +#ifdef TAO_HAS_VALUETYPE + // Value factory operations (CORBA 2.3 ptc/98-10-05 Ch. 4.2 p.4-7) + CORBA::ValueFactory_ptr register_value_factory ( + const char *repository_id, + CORBA::ValueFactory_ptr factory, + CORBA_Environment &ACE_TRY_ENV = + CORBA::default_environment () ); + void unregister_value_factory (const char * repository_id, + CORBA_Environment &ACE_TRY_ENV = + CORBA::default_environment () ); + CORBA::ValueFactory_ptr lookup_value_factory (const char *repository_id, + CORBA_Environment &ACE_TRY_ENV = CORBA::default_environment () ); +#endif /* TAO_HAS_VALUETYPE */ + #if !defined (TAO_HAS_MINIMUM_CORBA) void create_list (CORBA::Long count, @@ -426,8 +444,8 @@ public: // Resolve the POA. TAO_Stub *create_stub_object (const TAO_ObjectKey &key, - const char *type_id, - CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); + const char *type_id, + CORBA_Environment &TAO_IN_ENV = CORBA::default_environment ()); // Makes sure that the ORB is open and then creates an IIOP object // based on the endpoint. @@ -514,7 +532,7 @@ protected: private: CORBA_Object_ptr resolve_service (CORBA::String service_name, - ACE_Time_Value *timeout, + ACE_Time_Value *timeout, CORBA::Environment& ACE_TRY_ENV); // Resolve the service name. @@ -523,9 +541,9 @@ private: // Resolve the trading object reference. int multicast_query (char *buf, - const char *service_name, - u_short port, - ACE_Time_Value *timeout); + const char *service_name, + u_short port, + ACE_Time_Value *timeout); // returns and IOR string, the client is responsible for freeing // memory! @@ -606,6 +624,11 @@ private: TAO_ORB_Core* orb_core_; // The ORB_Core that created us.... +#ifdef TAO_HAS_VALUETYPE + TAO_ValueFactory_Map *valuetype_factory_map_; + // If non-0 then this is the Factory for OBV unmarshaling +#endif /* TAO_HAS_VALUETYPE */ + TAO_IOR_LookupTable lookup_table_; // Table of ObjectID->IOR mappings. diff --git a/TAO/tao/ValueBase.cpp b/TAO/tao/ValueBase.cpp new file mode 100644 index 00000000000..d42501aa56a --- /dev/null +++ b/TAO/tao/ValueBase.cpp @@ -0,0 +1,259 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueBase.cpp +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + + +#include "tao/CDR.h" +#include "tao/ORB.h" +#include "tao/ORB_Core.h" +#include "tao/ValueBase.h" + +#ifdef TAO_HAS_VALUETYPE + +#if !defined (__ACE_INLINE__) +# include "tao/ValueBase.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(tao, ValueBase, "$Id$") + + +// destructor +CORBA_ValueBase::~CORBA_ValueBase (void) +{ +} + +CORBA_ValueBase* +CORBA_ValueBase::_downcast (CORBA_ValueBase* vt) +{ + return vt; // every vt is a CORBA::ValueBase :-) +} + + +// OBV marshaling in principle: +// _tao_marshal () is called from the CDR operator<< () +// to marshal a valuetype. To marshal the state +// it calls (virtual) _tao_marshal_v () (IDL generated) on itself +// which 'jumps' to the most derived valuetype class. This function +// further calls (inline) _tao_marshal_state, which is generated from +// IDL too and does the marshaling of state members and base classes +// (before, if any) actually. +// Fragmentation (chunking) needs some cooperation with the CDR stream. +// It needs to keep track of the state we're in: +// (outside chunk, beginning of chunk - no data, inside chunk and +// the nesting level of valuetypes. (The chunks itself are not nested.)) + +// (see CORBA 2.3 GIOP 15.3.4) + +CORBA::Boolean +CORBA_ValueBase::_tao_marshal (TAO_OutputCDR &strm, + CORBA_ValueBase *this_, + ptr_arith_t formal_type_id) +{ + CORBA::Boolean retval = 1; + // %! yet much to do ... look for +++ ! + + // 1. Is 'this' yet marshalled ? (->1a) + // If not then mark 'this' as marshalled. (->2) +++ + // Or is it null ? (write null_ref and return ok) + // 1a. Put indirection and return successfull. + + if (this_ == 0) + { + retval = strm.write_ulong (TAO_OBV_GIOP_Flags::Null_ref); + return retval; + } + + // 2. if (chunking) and we are in a chunk (look in strm), + // end the chunk by writing its length at its start. + // This is the responsibility of the CDR stream. +++ + // But if nothing is writtern in this chunk yet, + // we want to overwrite the place of the dummy blocksize-tag + // with our <value-tag>. + // Increase the nesting level of valuetypes. + + // 3. Build <value-tag>, which states if chunking is used + // and if type information ((list of) repository id(s)) + // is provided. The latter is necessary if the formal_type_id + // is unequal the 'true derived' type of this object. +++ + + CORBA::ULong value_tag = TAO_OBV_GIOP_Flags::Value_tag_base | + TAO_OBV_GIOP_Flags::Type_info_single; + + retval = strm.write_ulong (value_tag); + if (!retval) + return retval; + + // 4. Marshal type information. + + retval = strm.write_string (this_->_tao_obv_repository_id ()); + if (!retval) + return retval; + + // 5. if (chunking) let room for a blocksize-tag. (i.e. write ULong) + + // 6. Now marshal state members. (%! Problem when state is empty + // and chunked encoding is used.) + + retval = this_->_tao_marshal_v (strm); + + // 7. if (chunking) let strm overwrite the last blocksize tag + // with its concrete value. +++ + // 8. if (chunking) write an end tag, or (optimization) let the CDR + // care for collecting all end tags of nested values (e.g. linked + // list), so that only one end tag at all must be written. +++ + + return retval; +} + + +CORBA::Boolean +CORBA_ValueBase::_tao_unmarshal (TAO_InputCDR &strm, + CORBA_ValueBase *& new_object) +{ + // This is for the special case only that one unmarshals in order + // to assign the newly created object directly to a ValueBase pointer. + // Implementation is like a specialized one (in TC.cpp, if T.idl is source). + // basically do: + // ValueBase::_tao_unmarshal_pre () + // (Gets factory or possible a null or an existing object. + // Then the job is done. On an existing (backreferenced) object + // do a cast and a type check) + // new_object = factory->create_for_unmarshal () + // (with apropriate cast) + // new_object->_tao_unmarshal_v () + // new_object->_tao_unmarshal_post () + + ACE_DEBUG ((LM_DEBUG, "unimpl. CORBA::ValueBase::_tao_unmarshal\n")); + return 0; // %! +} + + +CORBA::Boolean +CORBA_ValueBase::_tao_unmarshal_pre (TAO_InputCDR &strm, + CORBA_ValueFactory_ptr &factory, + CORBA_ValueBase *&valuetype, + const char * const repo_id) +{ // %! dont leak on error case ! + // %! postconditions + CORBA::Boolean retval = 1; + factory = 0; + // %! yet much to do ... look for +++ ! + + // 1. Get the <value-tag> (else it may be <indirection-tag> or <null-ref>). + // Is object yet unmarshalled (<indirection-tag> is set) ? (->1a) + // Is <null-ref> given ? Set 0 and return ok. + // 1a. Lookup the real address in memory, which should be aligned +++ + // to CORBA::ValueBase. Its possible at this point that worse + // type mismatch gets by undetected, if the CDR stream fakes. + // So the type should be checked ... +++ + + CORBA::ULong value_tag; + if (!strm.read_ulong (value_tag)) + { + return 0; + } + + if (TAO_OBV_GIOP_Flags::is_null_ref (value_tag)) + { + valuetype = 0; + return 1; + // ok, null reference unmarshaled + } + // 2. Now at this point it must be a <value-tag> (error else). + // if (chunking) check that any last chunk ends with matching + // size. If not raise marshal exception. + // Increase the nesting level of valuetypes. + + if (!TAO_OBV_GIOP_Flags::is_value_tag (value_tag)) + { + ACE_DEBUG ((LM_DEBUG, "!CORBA::ValueBase::_tao_unmarshal_pre not value_tag\n")); + return 0; + } + + // 3. if (chunking) read and record the blocksize-tag. + + // 4. Unmarshal type information and lookup factory. + // If no type information is given in the CDR encoding, as told + // from the <value-tag>, then use the repository id parameter + // (it _must_ be right). + + CORBA::String_var repo_id_stream; + + // It would be more efficient not to copy the string %!) + if (strm.read_string (repo_id_stream.inout ()) == 0) + { + return 0; + } + + factory = TAO_ORB_Core_instance ()->orb () // @@ %! right way to access ? + ->lookup_value_factory (repo_id_stream.in()); + if (factory == 0) // %! except.! + { + ACE_DEBUG ((LM_ERROR, "(%N:%l) OBV factory is null !!!\n")); + return 0; + } + + return retval; +} + +CORBA::Boolean +CORBA_ValueBase::_tao_unmarshal_post (TAO_InputCDR &strm) +{ + CORBA::Boolean retval = 1; + + // (... called from T::_tao_unmarshal) + // 7. if (chunking) check the last blocksize tag for correct value. +++ + // And if we're gonna to truncate, skip all the state of the more + // derived classes. (But it might need to be accessed again, + // if there are embedded objects which are referenced later + // in this CDR encoding stream.) + + // 8. if (chunking) there must be some end tag. Let the CDR stream deal + // with this (and decrease the nesting level of valuetypes). + // Also the CDR stream must check for eventually outstanding end tags + // at the end of the stream which have to cause a marshal + // exception there. + + return retval; +} + + +// member functions for CORBA_DefaultValueRefCountBase ============ + +// destructor +CORBA_DefaultValueRefCountBase::~CORBA_DefaultValueRefCountBase (void) +{ +} + +void +CORBA_DefaultValueRefCountBase::_add_ref (void) +{ + this->_tao_add_ref (); +} + +void +CORBA_DefaultValueRefCountBase::_remove_ref (void) +{ + this->_tao_remove_ref (); +} + +CORBA::ULong +CORBA_DefaultValueRefCountBase::_refcount_value (void) +{ + return this->_tao_refcount_value (); +} + + + +#endif /* TAO_HAS_VALUETYPE */ diff --git a/TAO/tao/ValueBase.h b/TAO/tao/ValueBase.h new file mode 100644 index 00000000000..ceb24153731 --- /dev/null +++ b/TAO/tao/ValueBase.h @@ -0,0 +1,176 @@ +// This may look like C, but it's really -*- C++ -*- +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueBase.h +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + +#ifndef TAO_VALUEBASE_H +#define TAO_VALUEBASE_H + +#include "ace/OS.h" /* for ptr_arith_t */ +#include "tao/corbafwd.h" + +#ifdef TAO_HAS_VALUETYPE + + +class TAO_Export CORBA_ValueBase +{ + // = TITLE + // Abstract baseclass for Valuetypes + // (see CORBA 2.3 20.17.5) + +public: + // reference counting + virtual void _add_ref (void) = 0; + virtual void _remove_ref (void) = 0; + // %! virtual CORBA::ValueBase* _copy_value (void) = 0; + virtual CORBA::ULong _refcount_value (void) = 0; + + // dynamic casting + static CORBA::ValueBase* _downcast (CORBA::ValueBase*); + + virtual const char* _tao_obv_repository_id () const = 0; + // TAO extension + + // TAO internal -------------------------- + + static CORBA::Boolean _tao_marshal (TAO_OutputCDR &strm, + CORBA_ValueBase *_this, + ptr_arith_t formal_type_id = 0); + // Marshal a valuetype (see operator<< in tao_idl generated file + // how it is called) + + static CORBA::Boolean _tao_unmarshal (TAO_InputCDR &strm, + CORBA_ValueBase *&_this); + // Unmarshal a valuetype, if formal type is a pointer to ValueBase + + // static CORBA::Boolean + // T::_tao_unmarshal (TAO_InputCDR &, CORBA_ValueBase *&_this) + // is typespecific for valuetype T and generated from tao_idl + // Use this for unmarshaling. + + static CORBA::Boolean _tao_unmarshal_pre (TAO_InputCDR &strm, + CORBA_ValueFactory_ptr &, + CORBA_ValueBase *&, + const char * const repo_id); + CORBA::Boolean _tao_unmarshal_post (TAO_InputCDR &strm); + // Both used internally and are called from T::_tao_unmarshal () + + +public: // otherwise these cannot be called from a static function + virtual void *_tao_obv_narrow (ptr_arith_t) = 0; + + virtual CORBA::Boolean _tao_marshal_v (TAO_OutputCDR &) = 0; + // during marshal jump to the most derived part + + virtual CORBA::Boolean _tao_unmarshal_v (TAO_InputCDR &) = 0; + // called after obtaining the fresh object from create_for_unmarshal () + +protected: + CORBA_ValueBase (void); + CORBA_ValueBase (const CORBA_ValueBase&); + virtual ~CORBA_ValueBase (); + +private: + void operator= (const CORBA_ValueBase &); +}; // CORBA_ValueBase + + + + +class TAO_Export CORBA_DefaultValueRefCountBase : public virtual CORBA_ValueBase +{ + // = TITLE + // Default mix-in for reference count of a valuetype. + +public: + virtual void _add_ref (void); + virtual void _remove_ref (void); + virtual CORBA::ULong _refcount_value (void); + + void _tao_add_ref (void); + void _tao_remove_ref (void); + CORBA::ULong _tao_refcount_value (void); + // The _tao variants are inline for fast access from T_var + // (if valuetype T is compiled with optimization for that.) %! (todo) + +protected: + CORBA_DefaultValueRefCountBase (void); + CORBA_DefaultValueRefCountBase (const CORBA_DefaultValueRefCountBase&); + virtual ~CORBA_DefaultValueRefCountBase (); + +private: + void operator= (const CORBA_DefaultValueRefCountBase &); + +private: // data + CORBA::ULong _tao_reference_count_; + ACE_SYNCH_MUTEX _tao_reference_count_lock_; +}; // CORBA_DefaultValueRefCountBase + +// %! which lock has the lowest memory overhead ? +// %! todo refcountbase w/o locking (now memory overhead) +// $! todo: debug aids for refcounts + + +class TAO_OBV_GIOP_Flags +{ + // CORBA 2.3: 15.3.4 +public: + enum Tag // test: + { + Null_ref = 0x00000000L, // equal + Value_tag_base = 0x7fffff00L, + Value_tag_sigbits = 0xffffff00L, + Codebase_url = 0x00000001L, // and + Type_info_no = 0x00000000L, + Type_info_single = 0x00000002L, + Type_info_list = 0x00000006L, + Type_info_sigbits = 0x00000006L, + Chunked_encoding = 0x00000008L, // and + Indirection_tag = 0xffffffffL, // equal + Block_size_tag_min = 1, // range + Block_size_tag_max = 0x7fffff00L -1, + // @@ %! but how encode a stateless block ? + End_tag_min = -0x80000000L +1, // range + End_tag_max = -1, + Indirection_min = -0x80000000L +1, // range + Indirection_max = -5, + }; + // all flags without a comment are complete tested against + // the analog _sigbits mask. + + + +public: + static CORBA::Boolean is_null_ref (const CORBA::ULong); + static CORBA::Boolean is_value_tag (const CORBA::ULong); + static CORBA::Boolean has_codebase_url (const CORBA::ULong); + static CORBA::Boolean has_no_type_info (const CORBA::ULong); + static CORBA::Boolean has_single_type_info (const CORBA::ULong); + static CORBA::Boolean has_list_type_info (const CORBA::ULong); + static CORBA::Boolean is_chunked (const CORBA::ULong); + static CORBA::Boolean is_indirection_tag (const CORBA::ULong); + static CORBA::Boolean block_size (const CORBA::ULong, CORBA::ULong &size); + static CORBA::Boolean end_tag_depth (const CORBA::ULong, CORBA::ULong &d); + static CORBA::Boolean indirection (const CORBA::ULong, CORBA::Long &jump); + // static CORBA::Boolean (const CORBA::ULong); + // static CORBA::Boolean (const CORBA::ULong); + +}; + +#if defined (__ACE_INLINE__) +# include "tao/ValueBase.i" +#endif /* __ACE_INLINE__) */ + +#endif /* TAO_HAS_VALUETYPE */ +#endif /* TAO_VALUEBASE_H */ diff --git a/TAO/tao/ValueBase.i b/TAO/tao/ValueBase.i new file mode 100644 index 00000000000..ed1679670ee --- /dev/null +++ b/TAO/tao/ValueBase.i @@ -0,0 +1,175 @@ +// This may not look like C++, but it's really -*- C++ -*- +// $Id$ + +// static operations in namespace CORBA ======================== + +ACE_INLINE void +CORBA::add_ref (CORBA::ValueBase *val) +{ + if (val) + val->_add_ref (); +} + +ACE_INLINE void +CORBA::remove_ref (CORBA::ValueBase *val) +{ + if (val) + val->_remove_ref (); +} + +// =========================================================== + +// constructor +ACE_INLINE +CORBA_ValueBase::CORBA_ValueBase (void) +{ +} + + +// =========================================================== + +// constructor +ACE_INLINE +CORBA_DefaultValueRefCountBase::CORBA_DefaultValueRefCountBase (void) + : _tao_reference_count_ (1) +{ +} + + +ACE_INLINE void +CORBA_DefaultValueRefCountBase::_tao_add_ref (void) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_); + ++_tao_reference_count_; +} + +ACE_INLINE void +CORBA_DefaultValueRefCountBase::_tao_remove_ref (void) +{ + { + ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_); + -- this->_tao_reference_count_; + if (this->_tao_reference_count_ != 0) + return; + } + // The guard has been already given up, but this is no problem + // cause we have held the last reference, and this one we don't give + // away anymore, we do: + delete this; +} + +ACE_INLINE CORBA::ULong +CORBA_DefaultValueRefCountBase::_tao_refcount_value (void) +{ + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_,0); + return _tao_reference_count_; +} + +// =========================================================== + +// Detection of flags in the CDR Stream + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::is_null_ref (const CORBA::ULong tag) +{ + return (tag == Null_ref); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::is_value_tag (const CORBA::ULong tag) +{ + return ((tag & Value_tag_sigbits) == Value_tag_base); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: has_codebase_url(const CORBA::ULong tag) +{ + return (tag & Codebase_url); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::has_no_type_info (const CORBA::ULong tag) +{ + return ((tag & Type_info_sigbits) == Type_info_no); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::has_single_type_info (const CORBA::ULong tag) +{ + return ((tag & Type_info_sigbits) == Type_info_single); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::has_list_type_info (const CORBA::ULong tag) +{ + return ((tag & Type_info_sigbits) == Type_info_list); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: is_chunked (const CORBA::ULong tag) +{ + return (tag & Chunked_encoding); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags::is_indirection_tag (const CORBA::ULong tag) +{ + return (tag == Indirection_tag); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: block_size (const CORBA::ULong tag, CORBA::ULong &size) +{ + if ((tag >= Block_size_tag_min) && + (tag <= Block_size_tag_max)) + { + size = tag; + return 1; + } + return 0; +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: end_tag_depth (const CORBA::ULong tag, + CORBA::ULong &depth) +{ + if (ACE_static_cast (CORBA::Long, tag) + >= (ACE_static_cast (CORBA::Long, End_tag_min)) && + ACE_static_cast (CORBA::Long, tag) + <= (ACE_static_cast (CORBA::Long, End_tag_max))) + { + depth = - ACE_static_cast (CORBA::Long, tag); + return 1; + } + return 0; +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: indirection (const CORBA::ULong tag, + CORBA::Long &jump) +{ + if (ACE_static_cast (CORBA::Long, tag) + >= (ACE_static_cast (CORBA::Long, Indirection_min)) && + ACE_static_cast (CORBA::Long, tag) + <= (ACE_static_cast (CORBA::Long, Indirection_max))) + { + jump = ACE_static_cast (CORBA::Long, tag); + return 1; + } + return 0; +} + +/* +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: (const CORBA::ULong tag) +{ + return ( ); +} + +ACE_INLINE CORBA::Boolean +TAO_OBV_GIOP_Flags:: (const CORBA::ULong tag) +{ + return ( ); +} + +*/ diff --git a/TAO/tao/ValueFactory.cpp b/TAO/tao/ValueFactory.cpp new file mode 100644 index 00000000000..6b8f049ca11 --- /dev/null +++ b/TAO/tao/ValueFactory.cpp @@ -0,0 +1,31 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueFactory.cpp +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + + +#include "tao/ValueFactory.h" + +#ifdef TAO_HAS_VALUETYPE + +#if !defined (__ACE_INLINE__) +# include "tao/ValueFactory.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(tao, ValueFactory, "$Id$") + +CORBA_ValueFactoryBase::~CORBA_ValueFactoryBase () +{ +} + +#endif /* TAO_HAS_VALUETYPE */ diff --git a/TAO/tao/ValueFactory.h b/TAO/tao/ValueFactory.h new file mode 100644 index 00000000000..9b0557f2611 --- /dev/null +++ b/TAO/tao/ValueFactory.h @@ -0,0 +1,94 @@ +// This may look like C, but it's really -*- C++ -*- +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueFactory.h +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + +#ifndef TAO_VALUEFACTORY_H +#define TAO_VALUEFACTORY_H + +#include "tao/corbafwd.h" + +#ifdef TAO_HAS_VALUETYPE + + +class TAO_Export CORBA_ValueFactoryBase +{ + /* friend CORBA::Boolean _tao_unmarshal_pre (TAO_InputCDR &, + CORBA_ValueFactory_ptr &, + CORBA_ValueBase *&, + const char * const); + %! how can I make the friendship work ? (g++) */ +public: + CORBA_ValueFactoryBase (); + virtual ~CORBA_ValueFactoryBase (); + + // non-standard + virtual const char* tao_repository_id () = 0; + + // non-virtual is non-standard + void _add_ref (void); + void _remove_ref (void); + + // private: %! + virtual CORBA_ValueBase* create_for_unmarshal (void) = 0; + // In a derived class T use return type TAO_OBV_CREATE_RETURN_TYPE (T) + // (see at definition below) + +private: + CORBA::ULong _tao_reference_count_; + ACE_SYNCH_MUTEX _tao_reference_count_lock_; +}; // CORBA_ValueFactoryBase + + + +// Use this macro for writing code that is independend from +// the compiler support of covariant return types of pointers to +// virtual inherited classes. +// (e.g. in egcs-2.90.29 980515 (egcs-1.0.3 release) its not yet implemented) +// (But it is TAO specific and at the moment the covariant case is not +// elaborated --- its just a suggestion.) + +#ifdef TAO_HAS_OBV_COVARIANT_RETURN +# define TAO_OBV_CREATE_RETURN_TYPE(TYPE) TYPE * +#else /* TAO_HAS_OBV_COVARIANT_RETURN */ +# define TAO_OBV_CREATE_RETURN_TYPE(TYPE) CORBA::ValueBase * +#endif /* TAO_HAS_OBV_COVARIANT_RETURN */ + + + +// (The obtaining of the repository id is currently not yet like the OMG way. %!) +// +// Macro for on the fly registration of a factory (with type Factory). +// The repository id is taken from the static repository id of the +// valuetype via tao_repository_id () of the specialized factory. +// It forgets the pre-registered factory (if any) and the reference +// to the newly created one. (A new reference could be obtained with +// orb->lookup_value_factory (CORBA::String repo_id) .) + +#define TAO_OBV_REGISTER_FACTORY(FACTORY) \ + { CORBA_ValueFactory_ptr factory = new FACTORY; \ + CORBA_ValueFactory_ptr prev_factory = \ + TAO_ORB_Core_instance ()->orb ()->register_value_factory (\ + factory->tao_repository_id (),\ + factory); \ + if (prev_factory) prev_factory->_remove_ref (); \ + factory->_remove_ref (); } + + +#if defined (__ACE_INLINE__) +# include "tao/ValueFactory.i" +#endif /* __ACE_INLINE__) */ + +#endif /* TAO_HAS_VALUETYPE */ +#endif /* TAO_VALUEFACTORY_H */ diff --git a/TAO/tao/ValueFactory.i b/TAO/tao/ValueFactory.i new file mode 100644 index 00000000000..84d4da93833 --- /dev/null +++ b/TAO/tao/ValueFactory.i @@ -0,0 +1,26 @@ +// $Id$ + +ACE_INLINE +CORBA_ValueFactoryBase::CORBA_ValueFactoryBase () + : _tao_reference_count_ (1) +{ +} + +ACE_INLINE void +CORBA_ValueFactoryBase::_add_ref (void) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_); + ++_tao_reference_count_; +} + +ACE_INLINE void +CORBA_ValueFactoryBase::_remove_ref (void) +{ + { + ACE_GUARD (ACE_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_); + -- this->_tao_reference_count_; + if (this->_tao_reference_count_ != 0) + return; + } + delete this; +} diff --git a/TAO/tao/ValueFactory_Map.cpp b/TAO/tao/ValueFactory_Map.cpp new file mode 100644 index 00000000000..39f5b127165 --- /dev/null +++ b/TAO/tao/ValueFactory_Map.cpp @@ -0,0 +1,132 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueFactory_Map.cpp +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + +#include "tao/ValueFactory_Map.h" +#include "tao/ValueFactory.h" +#include "tao/ORB.h" + +#ifdef TAO_HAS_VALUETYPE + +#if !defined (__ACE_INLINE__) +# include "tao/ValueFactory_Map.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(tao, ValueFactory_Map, "$Id$") + + +TAO_ValueFactory_Map::TAO_ValueFactory_Map () + : map_ () // use default size and allocator +{ +} + +TAO_ValueFactory_Map::~TAO_ValueFactory_Map () +{ + // Initialize an iterator. We need to go thru each entry and free + // up storage allocated to hold the external ids and invoke + // _remove_ref () on the internal ids. + FACTORY_MAP_MANAGER::ITERATOR iterator (this->map_); + + for (FACTORY_MAP_MANAGER::ENTRY *entry = 0; + iterator.next (entry) != 0; + iterator.advance ()) + { + // We had allocated memory and stored the string. So we free the + // memory. + CORBA::string_free ((char *) entry->ext_id_); + entry->ext_id_ = 0; + entry->int_id_->_remove_ref (); + entry->int_id_ = 0; + } +} + +// %! Thread issues + +int +TAO_ValueFactory_Map::rebind (const char *repo_id, + CORBA_ValueFactory_ptr &factory) +{ +// ACE_READ_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, guard, map_->mutex(),-1); +// --- but must be recursive + char *prev_repo_id; + CORBA_ValueFactory_ptr prev_factory; + int ret = this->map_.rebind (CORBA::string_dup (repo_id), + factory, + prev_repo_id, prev_factory); + if (ret > -1) // ok, no error + { + factory->_add_ref (); // The map owns one reference. + if (ret == 1) // there was a previous factory + { + factory = prev_factory; + CORBA::string_free (prev_repo_id); + } + } + return ret; +} + +int +TAO_ValueFactory_Map::unbind (const char *repo_id, + CORBA_ValueFactory_ptr &factory) +{ + // ACE_Hash_Map_Entry<const char *, CORBA_ValueFactory_ptr> *prev_entry; + FACTORY_MAP_MANAGER::ENTRY *prev_entry; + int ret = this->map_.find (repo_id, prev_entry); + if (ret == 0) // there was a matching factory + { + // set factory to the previous factory, + factory = prev_entry->int_id_; + char *temp = ACE_const_cast (char *, prev_entry->ext_id_); + ret = this->map_.unbind (prev_entry); + if (ret == 0) + { + CORBA::string_free (temp); + } + } + return ret; +} + +// %! perhaps inline +int +TAO_ValueFactory_Map::find (const char *repo_id, + CORBA_ValueFactory_ptr &factory) +{ + int ret = this->map_.find (repo_id, factory); + // %! this must be guarded to be atomic !!!!!!!!!!!!!!!!!! + if (ret > -1) + { + factory->_add_ref (); // The caller gets one reference as gift. + } + return ret; +} + + + + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Hash_Map_Iterator_Base_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Manager_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Entry<const char *, CORBA_ValueFactory_ptr>; +template class ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Entry<const char *, CORBA_ValueFactory_ptr> +#pragma instantiate ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + + +#endif /* TAO_HAS_VALUETYPE */ diff --git a/TAO/tao/ValueFactory_Map.h b/TAO/tao/ValueFactory_Map.h new file mode 100644 index 00000000000..95952dab090 --- /dev/null +++ b/TAO/tao/ValueFactory_Map.h @@ -0,0 +1,77 @@ +// This may look like C, but it's really -*- C++ -*- +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// ValueFactory_Map.h +// +// = AUTHOR +// Torsten Kuepper <kuepper2@lfa.uni-wuppertal.de> +// +// ============================================================================ + +#ifndef TAO_VALUEFACTORY_MAP_H +#define TAO_VALUEFACTORY_MAP_H + +#include "ace/Hash_Map_Manager.h" +#include "ace/Singleton.h" +#include "ace/Synch.h" +#include "tao/corbafwd.h" + +#ifdef TAO_HAS_VALUETYPE + +class TAO_ValueFactory_Map +{ +public: + TAO_ValueFactory_Map (); + ~TAO_ValueFactory_Map (); + + + int rebind (const char *repo_id, CORBA_ValueFactory_ptr &factory); + // Associate the factory (int_id) with the repo_id (ext_id). + // Invokes _add_ref () on the factory. + // If previous factory had been bind with this repo_id, this one is + // returned in factory (and the caller holds a reference). + // Returns -1 on failure, 0 on success and 1 if a previous factory + // is found (and returned in factory). + + int unbind (const char *repo_id, CORBA_ValueFactory_ptr &factory); + // Removes entry for repo_id from the map and sets factory to + // the tied one. + + int find (const char *repo_id, CORBA_ValueFactory_ptr &factory); + // Lookup a matching factory for repo_id. + // Invokes _add_ref () on the factory if found. + // Returns -1 on failure and 0 on success. + + void dump (void); +private: + + typedef ACE_Hash_Map_Manager_Ex<const char *, + CORBA_ValueFactory_ptr, + ACE_Hash<const char *>, + ACE_Equal_To<const char *>, + ACE_SYNCH_RW_MUTEX> + FACTORY_MAP_MANAGER; + FACTORY_MAP_MANAGER map_; + // The hash table data structure. +}; /* TAO_ValueFactory_Map */ + + +// currently the ValueFactory_Map is a singleton and not per ORB +// as in the OMG specs +typedef ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> + TAO_VALUEFACTORY_MAP; + + + +#if defined (__ACE_INLINE__) +# include "tao/ValueFactory_Map.i" +#endif /* __ACE_INLINE__) */ + +#endif /* TAO_HAS_VALUETYPE */ +#endif /* TAO_VALUEFACTORY_MAP_H */ diff --git a/TAO/tao/ValueFactory_Map.i b/TAO/tao/ValueFactory_Map.i new file mode 100644 index 00000000000..cfa1da318d3 --- /dev/null +++ b/TAO/tao/ValueFactory_Map.i @@ -0,0 +1 @@ +// $Id$ diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h index be1c3e2f2ee..171c423e4c8 100644 --- a/TAO/tao/corba.h +++ b/TAO/tao/corba.h @@ -77,6 +77,8 @@ #include "tao/Sequence_T.h" #include "tao/Object_KeyC.h" #include "tao/Union.h" +#include "tao/ValueBase.h" +#include "tao/ValueFactory.h" #if !defined (ACE_NESTED_CLASS) #if defined (ACE_WIN32) diff --git a/TAO/tao/corbafwd.h b/TAO/tao/corbafwd.h index 29fe4dfc360..9f9cfc0785e 100644 --- a/TAO/tao/corbafwd.h +++ b/TAO/tao/corbafwd.h @@ -165,7 +165,7 @@ class CORBA_NVList_var; class CORBA_NVList_out; typedef class CORBA_NVList *CORBA_NVList_ptr; -#endif /* TAO_HAS_MINIMUM_CORBA */ +#endif /* ! TAO_HAS_MINIMUM_CORBA */ class CORBA_ORB; class CORBA_ORB_var; @@ -207,6 +207,13 @@ typedef class CORBA_ImplementationDef *CORBA_ImplementationDef_ptr; typedef class CORBA_InterfaceDef *CORBA_InterfaceDef_ptr; +#ifdef TAO_HAS_VALUETYPE +class CORBA_ValueBase; +class CORBA_ValueFactoryBase; +typedef CORBA_ValueFactoryBase *CORBA_ValueFactory_ptr; +class CORBA_DefaultValueRefCountBase; +#endif /* TAO_HAS_VALUETYPE */ + class CORBA_String_var; class CORBA_String_out; @@ -431,6 +438,18 @@ public: typedef CORBA_Current_var Current_var; typedef CORBA_Current_out Current_out; +#ifdef TAO_HAS_VALUETYPE + typedef CORBA_ValueBase ValueBase; + typedef CORBA_ValueFactoryBase ValueFactoryBase; + typedef CORBA_ValueFactoryBase *ValueFactory; + // as CORBA 2.3a C++ map. 20.17.10 says + typedef CORBA_ValueFactoryBase *ValueFactory_ptr; + // own invention, more readable + typedef CORBA_DefaultValueRefCountBase DefaultValueRefCountBase; + static void add_ref (ValueBase *); + static void remove_ref (ValueBase *); +#endif /* TAO_HAS_VALUETYPE */ + // enum values defined in nvlist.hh, bitwise ORed. typedef u_int Flags; diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index d9386a43c2c..20418a759f6 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -245,16 +245,16 @@ // The IDL compiler can generate the classes corresponding to IDL // sequences in two ways: // + Use the TAO templates for sequences, -// i.e. TAO_{Unb,B}ounded_Sequence<> +// i.e. TAO_{Unb,B}ounded_Sequence<> // + Explicitly generate code for the sequence. // // The first approach can (potentially) produce smaller code, because -// the code for a sequence over a particular type (say sequence<long>) +// the code for a sequence over a particular type (say sequence<long>) // can be shared across multiple IDL files. // Unfortunately it is hard to manage the template instantiations on // platforms that do not automatically generate them, mainly because // it is hard to decide on which generated file are the templates -// instantiated. Thus the second approach is more convenient for most +// instantiated. Thus the second approach is more convenient for most // applications. // // On platforms that support automatic template instantiation we use @@ -284,6 +284,9 @@ // The Root POA default name. #define TAO_DEFAULT_ROOTPOA_NAME "" +// OBV is in experimental stage +#define TAO_HAS_VALUETYPE + // Minimum CORBA // #define TAO_HAS_MINIMUM_CORBA |