diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-22 21:28:08 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-22 21:28:08 +0000 |
commit | 35fb0f1eddffad2c372cfe331d3e3a9d5fb0e8b8 (patch) | |
tree | b0c51061cd9d398d0bd22924405656bce9c344dd /TAO | |
parent | 44a012ded1d6b96d45d6351c254614f44ec426d6 (diff) | |
download | ATCD-35fb0f1eddffad2c372cfe331d3e3a9d5fb0e8b8.tar.gz |
ChangeLogTag:Wed Jul 22 16:26:34 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO')
56 files changed, 931 insertions, 1741 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index b852978de62..e1b2fb9b071 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,73 @@ +Wed Jul 22 16:26:34 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/Makefile: + * tao/Marshal.h: + * tao/Marshal.i: + * tao/deep_copy.cpp: + The deep_copy methods are not used any more, Anys using + marshalling instead. + + * tao/ORB.h: + * tao/NVList.h: + * tao/NVList.i: + * tao/Request.h: + * tao/Request.i: + Added T_var and T_out classes for NVList, NamedValue and + Request. + + * tao/Object.i: + * tao/Object.cpp: + All the Object_out and Object_var methods are defined as inline + methods. + + * tests/Param_Test/client.cpp: + Use the new CORBA::Request_var class. + + * tests/Param_Test/any.cpp: + * tests/Param_Test/any.h: + * tests/Param_Test/bd_long_seq.cpp: + * tests/Param_Test/bd_long_seq.h: + * tests/Param_Test/bd_short_seq.cpp: + * tests/Param_Test/bd_short_seq.h: + * tests/Param_Test/bd_str_seq.cpp: + * tests/Param_Test/bd_str_seq.h: + * tests/Param_Test/bd_string.cpp: + * tests/Param_Test/bd_string.h: + * tests/Param_Test/bd_struct_seq.cpp: + * tests/Param_Test/bd_struct_seq.h: + * tests/Param_Test/fixed_array.cpp: + * tests/Param_Test/fixed_array.h: + * tests/Param_Test/fixed_struct.cpp: + * tests/Param_Test/fixed_struct.h: + * tests/Param_Test/nested_struct.cpp: + * tests/Param_Test/nested_struct.h: + * tests/Param_Test/objref.cpp: + * tests/Param_Test/objref.h: + * tests/Param_Test/short.cpp: + * tests/Param_Test/short.h: + * tests/Param_Test/typecode.cpp: + * tests/Param_Test/typecode.h: + * tests/Param_Test/ub_any_seq.cpp: + * tests/Param_Test/ub_any_seq.h: + * tests/Param_Test/ub_long_seq.cpp: + * tests/Param_Test/ub_long_seq.h: + * tests/Param_Test/ub_objref_seq.cpp: + * tests/Param_Test/ub_objref_seq.h: + * tests/Param_Test/ub_short_seq.cpp: + * tests/Param_Test/ub_short_seq.h: + * tests/Param_Test/ub_str_seq.cpp: + * tests/Param_Test/ub_str_seq.h: + * tests/Param_Test/ub_string.cpp: + * tests/Param_Test/ub_string.h: + * tests/Param_Test/ub_struct_seq.cpp: + * tests/Param_Test/ub_struct_seq.h: + * tests/Param_Test/var_array.cpp: + * tests/Param_Test/var_array.h: + * tests/Param_Test/var_struct.cpp: + * tests/Param_Test/var_struct.h: + The add_args() method receives NVList_ptr parameters instead of + NVList_ptr& otherwise it is too hard to use a NVList_var. + Wed Jul 22 15:58:11 1998 David L. Levine <levine@cs.wustl.edu> * TAO version 0.1.41 released. diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 5af87456450..5c41f8fa870 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -159,6 +159,7 @@ CORBA_Any::operator= (const CORBA_Any &src) // this I'm afraid we will have to leave with a memory leak // (coryan). // delete this->value_; + this->value_ = 0; } if (this->type_ != 0) @@ -245,6 +246,7 @@ CORBA_Any::replace (CORBA::TypeCode_ptr tc, // this I'm afraid we will have to leave with a memory leak // (coryan). // delete this->value_; + this->value_ = 0; } } @@ -254,7 +256,7 @@ CORBA_Any::replace (CORBA::TypeCode_ptr tc, CORBA::release (this->type_); this->type_ = tmp; - this->value_ = (void *) value; + this->value_ = ACE_const_cast(void *, value); this->any_owns_data_ = any_owns_data; this->cdr_ = 0; diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index 97f5d0530f7..a41e9fea323 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -43,7 +43,6 @@ ORBCORE_SRCS = \ append \ debug \ decode \ - deep_copy \ deep_free \ default_client \ default_server \ @@ -5919,228 +5918,6 @@ endif # cxvx86 $(TAO_ROOT)/tao/Server_Request.h \ $(TAO_ROOT)/tao/Server_Request.i \ $(TAO_ROOT)/tao/singletons.h -.obj/deep_copy.o .obj/deep_copy.so .shobj/deep_copy.o .shobj/deep_copy.so: deep_copy.cpp \ - $(TAO_ROOT)/tao/corba.h \ - $(TAO_ROOT)/tao/orbconf.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.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/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(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/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.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.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.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.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.cpp \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc_Base.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/SString.h \ - $(ACE_ROOT)/ace/SString.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 \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(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/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(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/Message_Queue.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(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/Task.h \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(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/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Svc_Handler.cpp \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Connector.cpp \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(ACE_ROOT)/ace/Acceptor.cpp \ - $(TAO_ROOT)/tao/Align.h \ - $(TAO_ROOT)/tao/ORB.h \ - $(TAO_ROOT)/tao/Sequence.h \ - $(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/Object_KeyC.h \ - $(TAO_ROOT)/tao/Object_KeyC.i \ - $(TAO_ROOT)/tao/Union.h \ - $(TAO_ROOT)/tao/ORB.i \ - $(TAO_ROOT)/tao/Exception.h \ - $(TAO_ROOT)/tao/Exception.i \ - $(TAO_ROOT)/tao/Any.h \ - $(TAO_ROOT)/tao/Any.i \ - $(TAO_ROOT)/tao/NVList.h \ - $(TAO_ROOT)/tao/NVList.i \ - $(TAO_ROOT)/tao/Principal.h \ - $(TAO_ROOT)/tao/Principal.i \ - $(TAO_ROOT)/tao/Request.h \ - $(TAO_ROOT)/tao/Request.i \ - $(TAO_ROOT)/tao/Stub.h \ - $(TAO_ROOT)/tao/Stub.i \ - $(TAO_ROOT)/tao/Object.h \ - $(TAO_ROOT)/tao/Object.i \ - $(TAO_ROOT)/tao/Typecode.h \ - $(TAO_ROOT)/tao/Typecode.i \ - $(TAO_ROOT)/tao/Marshal.h \ - $(TAO_ROOT)/tao/Marshal.i \ - $(TAO_ROOT)/tao/CDR.h \ - $(TAO_ROOT)/tao/CDR.i \ - $(TAO_ROOT)/tao/PolicyC.h \ - $(TAO_ROOT)/tao/PolicyC.i \ - $(TAO_ROOT)/tao/CurrentC.h \ - $(TAO_ROOT)/tao/CurrentC.i \ - $(TAO_ROOT)/tao/POA.h \ - $(TAO_ROOT)/tao/POAC.h \ - $(TAO_ROOT)/tao/POAC.i \ - $(TAO_ROOT)/tao/Servant_Base.h \ - $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/POA_CORBA.h \ - $(TAO_ROOT)/tao/POAS.i \ - $(TAO_ROOT)/tao/Object_Table.h \ - $(TAO_ROOT)/tao/POA.i \ - $(TAO_ROOT)/tao/poa_macros.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/Connect.h \ - $(TAO_ROOT)/tao/Connect.i \ - $(TAO_ROOT)/tao/ORB_Core.h \ - $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(ACE_ROOT)/ace/Dynamic_Service.cpp \ - $(TAO_ROOT)/tao/Operation_Table.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ - $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.h \ - $(TAO_ROOT)/tao/ORB_Strategies_T.i \ - $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/IIOP_Object.h \ - $(TAO_ROOT)/tao/IIOP_Object.i \ - $(TAO_ROOT)/tao/IIOP_ORB.h \ - $(TAO_ROOT)/tao/IIOP_ORB.i \ - $(TAO_ROOT)/tao/IIOP_Interpreter.h \ - $(TAO_ROOT)/tao/GIOP.h \ - $(TAO_ROOT)/tao/GIOP.i \ - $(TAO_ROOT)/tao/Invocation.h \ - $(TAO_ROOT)/tao/Invocation.i \ - $(TAO_ROOT)/tao/Server_Request.h \ - $(TAO_ROOT)/tao/Server_Request.i \ - $(TAO_ROOT)/tao/singletons.h .obj/deep_free.o .obj/deep_free.so .shobj/deep_free.o .shobj/deep_free.so: deep_free.cpp \ $(TAO_ROOT)/tao/corba.h \ $(TAO_ROOT)/tao/orbconf.h \ diff --git a/TAO/tao/Marshal.h b/TAO/tao/Marshal.h index c111cdb715e..a2a6b2e72df 100644 --- a/TAO/tao/Marshal.h +++ b/TAO/tao/Marshal.h @@ -100,8 +100,8 @@ class TAO_Export TAO_Marshal_Object // The Marshaling object that provides a common interface to the // CDR object for marshaling different IDL data types // - // Provides a set of virtual methods for encoding, decoding, - // deep_copying, and deep_freeing. + // Provides a set of virtual methods for encoding, decoding + // and deep_freeing. public: virtual CORBA::TypeCode::traverse_status encode (CORBA::TypeCode_ptr tc, const void *data, @@ -156,10 +156,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -198,10 +194,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *source, const void *, @@ -240,10 +232,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -282,10 +270,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -324,10 +308,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -366,10 +346,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -408,10 +384,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -450,10 +422,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -492,10 +460,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -534,10 +498,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -576,10 +536,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -617,10 +573,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, @@ -658,10 +610,6 @@ public: const void *parent_typecode, void *context, CORBA::Environment &env); - static CORBA::TypeCode::traverse_status deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env); static CORBA::TypeCode::traverse_status deep_free (CORBA::TypeCode_ptr tc, const void *data, const void *, diff --git a/TAO/tao/Marshal.i b/TAO/tao/Marshal.i index 51c13ac242b..d4c9655ccb1 100644 --- a/TAO/tao/Marshal.i +++ b/TAO/tao/Marshal.i @@ -154,70 +154,6 @@ TAO_Marshal_Factory::make_marshal_object (CORBA::TypeCode_ptr tc, } } -// the deep_copy methods - -// deep_copy for any -ACE_INLINE CORBA::TypeCode::traverse_status -TAO_Marshal_Any::deep_copy (CORBA::TypeCode_ptr, - const void *source, - const void *dest, - CORBA::Environment &) -{ - void* target = ACE_const_cast(void*,dest); - (void) new (target) CORBA::Any (*(CORBA::Any *) source); - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - -// deep_copy for TypeCode -ACE_INLINE CORBA::TypeCode::traverse_status -TAO_Marshal_TypeCode::deep_copy (CORBA::TypeCode_ptr, - const void *source, - const void *dest, - CORBA::Environment &) -{ - CORBA::TypeCode_ptr src = *(CORBA::TypeCode_ptr *) source; - if (!CORBA::is_nil (src)) - dest = CORBA::TypeCode::_duplicate (src); - else - dest = CORBA::TypeCode::_duplicate (CORBA::_tc_null); - - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - -// deep_copy for ObjRef -ACE_INLINE CORBA::TypeCode::traverse_status -TAO_Marshal_ObjRef::deep_copy (CORBA::TypeCode_ptr, - const void *source, - const void *dest, - CORBA::Environment &) -{ - *(CORBA::Object_ptr *) dest = CORBA::Object::_duplicate (*(CORBA::Object_ptr *) - source); - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - -// deep_copy for string -ACE_INLINE CORBA::TypeCode::traverse_status -TAO_Marshal_String::deep_copy (CORBA::TypeCode_ptr, - const void *source, - const void *dest, - CORBA::Environment &) -{ - *(CORBA::String *) dest = CORBA::string_copy (*(CORBA::String *) source); - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - -// deep_copy for wstring -ACE_INLINE CORBA::TypeCode::traverse_status -TAO_Marshal_WString::deep_copy (CORBA::TypeCode_ptr, - const void *source, - const void *dest, - CORBA::Environment &) -{ - *(CORBA::WString *) dest = CORBA::wstring_copy (*(CORBA::WString *) source); - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - // *************** deep_free methods ****************** // deep_free for Any diff --git a/TAO/tao/NVList.h b/TAO/tao/NVList.h index d6b6073839c..cd2fab107e0 100644 --- a/TAO/tao/NVList.h +++ b/TAO/tao/NVList.h @@ -76,6 +76,76 @@ private: friend class CORBA_Request; }; +typedef CORBA_NamedValue* CORBA_NamedValue_ptr; + +class TAO_Export CORBA_NamedValue_var +{ + // = TITLE + // The T_var class for NamedValue + // + // = DESCRIPTION + // As any other pseudo object NamedValue must have a T_var class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_NamedValue_ptr as the _ptr type instead of + // CORBA::NamedValue_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_NamedValue_var (void); // default constructor + CORBA_NamedValue_var (CORBA_NamedValue_ptr); + CORBA_NamedValue_var (const CORBA_NamedValue_var &); // copy constructor + ~CORBA_NamedValue_var (void); // destructor + + CORBA_NamedValue_var &operator= (CORBA_NamedValue_ptr); + CORBA_NamedValue_var &operator= (const CORBA_NamedValue_var &); + CORBA_NamedValue_ptr operator-> (void) const; + + operator const CORBA_NamedValue_ptr &() const; + operator CORBA_NamedValue_ptr &(); + // in, inout, out, _retn + CORBA_NamedValue_ptr in (void) const; + CORBA_NamedValue_ptr &inout (void); + CORBA_NamedValue_ptr &out (void); + CORBA_NamedValue_ptr _retn (void); + CORBA_NamedValue_ptr ptr (void) const; + +private: + CORBA_NamedValue_ptr ptr_; +}; + +class TAO_Export CORBA_NamedValue_out +{ + // = TITLE + // The T_out class for NamedValue + // + // = DESCRIPTION + // As any other pseudo object NamedValue must have a T_out class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_NamedValue_ptr as the _ptr type instead of + // CORBA::NamedValue_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_NamedValue_out (CORBA_NamedValue_ptr &); + CORBA_NamedValue_out (CORBA_NamedValue_var &); + CORBA_NamedValue_out (CORBA_NamedValue_out &); + CORBA_NamedValue_out &operator= (CORBA_NamedValue_out &); + CORBA_NamedValue_out &operator= (const CORBA_NamedValue_var &); + CORBA_NamedValue_out &operator= (CORBA_NamedValue_ptr); + operator CORBA_NamedValue_ptr &(); + CORBA_NamedValue_ptr &ptr (void); + CORBA_NamedValue_ptr operator-> (void); + +private: + CORBA_NamedValue_ptr &ptr_; +}; + +// **************************************************************** + class TAO_Export CORBA_NVList { // = TITLE @@ -97,35 +167,35 @@ public: CORBA::ULong count (void) const; // return the current number of elements in the list - CORBA::NamedValue_ptr add (CORBA::Flags, + CORBA_NamedValue_ptr add (CORBA::Flags, CORBA::Environment &); // add an element and just initialize the flags - CORBA::NamedValue_ptr add_item (const char *, + CORBA_NamedValue_ptr add_item (const char *, CORBA::Flags, CORBA::Environment &); // add an element and initialize its name and flags - CORBA::NamedValue_ptr add_value (const char *, + CORBA_NamedValue_ptr add_value (const char *, const CORBA::Any &, CORBA::Flags, CORBA::Environment &); // initializes a value, name, and flags - CORBA::NamedValue_ptr add_item_consume (char *, + CORBA_NamedValue_ptr add_item_consume (char *, CORBA::Flags, CORBA::Environment &); // just like add_item. In addition, memory management of char * name is taken // over by the NVList - CORBA::NamedValue_ptr add_value_consume (char *, + CORBA_NamedValue_ptr add_value_consume (char *, CORBA::Any_ptr, CORBA::Flags, CORBA::Environment &); // just like add_value. In addition, the NVList controls the memory // management of the char *name and Any *value parameter - CORBA::NamedValue_ptr item (CORBA::ULong n, CORBA::Environment &env); + CORBA_NamedValue_ptr item (CORBA::ULong n, CORBA::Environment &env); // retrieve the item at the nth location. Raises Bounds // CORBA::Status @@ -145,11 +215,11 @@ private: // constructor - cannot be instantiated directly other than through the // ORB::create_list method - CORBA::NamedValue_ptr add_element (CORBA::Flags, CORBA::Environment &); + CORBA_NamedValue_ptr add_element (CORBA::Flags, CORBA::Environment &); // helper to increase the list size. This is used by all the add_ methods of // the NVList class - ACE_Unbounded_Queue<CORBA::NamedValue_ptr> values_; + ACE_Unbounded_Queue<CORBA_NamedValue_ptr> values_; // internal list of parameters stored as NamedValues CORBA::ULong max_; @@ -165,6 +235,76 @@ private: friend class CORBA_Request; }; +typedef CORBA_NVList* CORBA_NVList_ptr; + +class TAO_Export CORBA_NVList_var +{ + // = TITLE + // The T_var class for NVList + // + // = DESCRIPTION + // As any other pseudo object NVList must have a T_var class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_NVList_ptr as the _ptr type instead of + // CORBA::NVList_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_NVList_var (void); + CORBA_NVList_var (CORBA_NVList_ptr); + CORBA_NVList_var (const CORBA_NVList_var &); + ~CORBA_NVList_var (void); + + CORBA_NVList_var &operator= (CORBA_NVList_ptr); + CORBA_NVList_var &operator= (const CORBA_NVList_var &); + CORBA_NVList_ptr operator-> (void) const; + + operator const CORBA_NVList_ptr &() const; + operator CORBA_NVList_ptr &(); + // in, inout, out, _retn + CORBA_NVList_ptr in (void) const; + CORBA_NVList_ptr &inout (void); + CORBA_NVList_ptr &out (void); + CORBA_NVList_ptr _retn (void); + CORBA_NVList_ptr ptr (void) const; + +private: + CORBA_NVList_ptr ptr_; +}; + +class TAO_Export CORBA_NVList_out +{ + // = TITLE + // The T_out class for NVList + // + // = DESCRIPTION + // As any other pseudo object NVList must have a T_out class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_NVList_ptr as the _ptr type instead of + // CORBA::NVList_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_NVList_out (CORBA_NVList_ptr &); + CORBA_NVList_out (CORBA_NVList_var &); + CORBA_NVList_out (CORBA_NVList_out &); + CORBA_NVList_out &operator= (CORBA_NVList_out &); + CORBA_NVList_out &operator= (const CORBA_NVList_var &); + CORBA_NVList_out &operator= (CORBA_NVList_ptr); + operator CORBA_NVList_ptr &(); + CORBA_NVList_ptr &ptr (void); + CORBA_NVList_ptr operator-> (void); + +private: + CORBA_NVList_ptr &ptr_; +}; + +// **************************************************************** + #if defined (__ACE_INLINE__) # include "tao/NVList.i" #endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/NVList.i b/TAO/tao/NVList.i index f7794e5c8fc..a4c9c3efd32 100644 --- a/TAO/tao/NVList.i +++ b/TAO/tao/NVList.i @@ -58,6 +58,167 @@ CORBA_NamedValue::_nil (void) return 0; } +// ************************************************************* +// Inline operations for class CORBA_NamedValue_var +// ************************************************************* + +ACE_INLINE +CORBA_NamedValue_var::CORBA_NamedValue_var (void) + : ptr_ (CORBA_NamedValue::_nil ()) +{ +} + +ACE_INLINE +CORBA_NamedValue_var::CORBA_NamedValue_var (CORBA_NamedValue_ptr p) + : ptr_ (p) +{} + +ACE_INLINE +CORBA_NamedValue_var::~CORBA_NamedValue_var (void) +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE CORBA_NamedValue_ptr +CORBA_NamedValue_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_NamedValue_var::CORBA_NamedValue_var (const CORBA_NamedValue_var &p) + : ptr_ (CORBA_NamedValue::_duplicate (p.ptr ())) +{} + +ACE_INLINE CORBA_NamedValue_var & +CORBA_NamedValue_var::operator= (CORBA_NamedValue_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE CORBA_NamedValue_var & +CORBA_NamedValue_var::operator= (const CORBA_NamedValue_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NamedValue::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +CORBA_NamedValue_var::operator const CORBA_NamedValue_ptr &() const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_NamedValue_var::operator CORBA_NamedValue_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr +CORBA_NamedValue_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr +CORBA_NamedValue_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr & +CORBA_NamedValue_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr & +CORBA_NamedValue_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NamedValue::_nil (); + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr +CORBA_NamedValue_var::_retn (void) +{ + // yield ownership + CORBA_NamedValue_ptr val = this->ptr_; + this->ptr_ = CORBA_NamedValue::_nil (); + return val; +} + +// ************************************************************* +// Inline operations for class CORBA_NamedValue_out +// ************************************************************* + +ACE_INLINE +CORBA_NamedValue_out::CORBA_NamedValue_out (CORBA_NamedValue_ptr &p) + : ptr_ (p) +{ + this->ptr_ = CORBA_NamedValue::_nil (); +} + +ACE_INLINE +CORBA_NamedValue_out::CORBA_NamedValue_out (CORBA_NamedValue_var &p) + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NamedValue::_nil (); +} + +ACE_INLINE +CORBA_NamedValue_out::CORBA_NamedValue_out (CORBA_NamedValue_out &p) + : ptr_ (p.ptr_) +{} + +ACE_INLINE CORBA_NamedValue_out & +CORBA_NamedValue_out::operator= (CORBA_NamedValue_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE CORBA_NamedValue_out & +CORBA_NamedValue_out::operator= (const CORBA_NamedValue_var &p) +{ + this->ptr_ = CORBA_NamedValue::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE CORBA_NamedValue_out & +CORBA_NamedValue_out::operator= (CORBA_NamedValue_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +CORBA_NamedValue_out::operator CORBA_NamedValue_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr & +CORBA_NamedValue_out::ptr (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NamedValue_ptr +CORBA_NamedValue_out::operator-> (void) +{ + return this->ptr_; +} + // **************************************************************** // = methods for the NVList class @@ -103,3 +264,163 @@ CORBA_NVList::_nil (void) return 0; } +// ************************************************************* +// Inline operations for class CORBA_NVList_var +// ************************************************************* + +ACE_INLINE +CORBA_NVList_var::CORBA_NVList_var (void) + : ptr_ (CORBA_NVList::_nil ()) +{ +} + +ACE_INLINE +CORBA_NVList_var::CORBA_NVList_var (CORBA_NVList_ptr p) + : ptr_ (p) +{} + +ACE_INLINE +CORBA_NVList_var::~CORBA_NVList_var (void) +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE CORBA_NVList_ptr +CORBA_NVList_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_NVList_var::CORBA_NVList_var (const CORBA_NVList_var &p) + : ptr_ (CORBA_NVList::_duplicate (p.ptr ())) +{} + +ACE_INLINE CORBA_NVList_var & +CORBA_NVList_var::operator= (CORBA_NVList_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE CORBA_NVList_var & +CORBA_NVList_var::operator= (const CORBA_NVList_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NVList::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +CORBA_NVList_var::operator const CORBA_NVList_ptr &() const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_NVList_var::operator CORBA_NVList_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr +CORBA_NVList_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr +CORBA_NVList_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr & +CORBA_NVList_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr & +CORBA_NVList_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NVList::_nil (); + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr +CORBA_NVList_var::_retn (void) +{ + // yield ownership + CORBA_NVList_ptr val = this->ptr_; + this->ptr_ = CORBA_NVList::_nil (); + return val; +} + +// ************************************************************* +// Inline operations for class CORBA_NVList_out +// ************************************************************* + +ACE_INLINE +CORBA_NVList_out::CORBA_NVList_out (CORBA_NVList_ptr &p) + : ptr_ (p) +{ + this->ptr_ = CORBA_NVList::_nil (); +} + +ACE_INLINE +CORBA_NVList_out::CORBA_NVList_out (CORBA_NVList_var &p) + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_NVList::_nil (); +} + +ACE_INLINE +CORBA_NVList_out::CORBA_NVList_out (CORBA_NVList_out &p) + : ptr_ (p.ptr_) +{} + +ACE_INLINE CORBA_NVList_out & +CORBA_NVList_out::operator= (CORBA_NVList_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE CORBA_NVList_out & +CORBA_NVList_out::operator= (const CORBA_NVList_var &p) +{ + this->ptr_ = CORBA_NVList::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE CORBA_NVList_out & +CORBA_NVList_out::operator= (CORBA_NVList_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +CORBA_NVList_out::operator CORBA_NVList_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr & +CORBA_NVList_out::ptr (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_NVList_ptr +CORBA_NVList_out::operator-> (void) +{ + return this->ptr_; +} diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index 3981ca91c63..142ad97a661 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -82,12 +82,18 @@ class CORBA_Exception; //typedef class CORBA_Exception *CORBA_Exception_ptr; class CORBA_Request; +class CORBA_Request_var; +class CORBA_Request_out; //typedef class CORBA_Request *CORBA_Request_ptr; class CORBA_NamedValue; +class CORBA_NamedValue_var; +class CORBA_NamedValue_out; //typedef class CORBA_NamedValue *CORBA_NamedValue_ptr; class CORBA_NVList; +class CORBA_NVList_var; +class CORBA_NVList_out; //typedef class CORBA_NVList *CORBA_NVList_ptr; class CORBA_ORB; @@ -485,9 +491,13 @@ public: typedef CORBA_NamedValue NamedValue; typedef NamedValue *NamedValue_ptr; + typedef CORBA_NamedValue_var NamedValue_var; + typedef CORBA_NamedValue_out NamedValue_out; typedef CORBA_NVList NVList; typedef NVList *NVList_ptr; + typedef CORBA_NVList_var NVList_var; + typedef CORBA_NVList_out NVList_out; typedef CORBA_Object Object; typedef CORBA_Object *Object_ptr; @@ -502,8 +512,10 @@ public: typedef CORBA_ORB_var ORB_var; typedef CORBA_ORB_out ORB_out; - typedef CORBA_Request Request; + typedef CORBA_Request Request; typedef Request *Request_ptr; + typedef CORBA_Request_var Request_var; + typedef CORBA_Request_out Request_out; typedef CORBA_ServerRequest ServerRequest; typedef ServerRequest *ServerRequest_ptr; diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 370e4ad773b..a7c846c826d 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -16,16 +16,6 @@ CORBA_Object::~CORBA_Object (void) this->protocol_proxy_->_decr_refcnt (); } -CORBA_Object_var::~CORBA_Object_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -CORBA_Object_var::CORBA_Object_var (void) // default constructor - : ptr_ (CORBA_Object::_nil ()) -{ -} - CORBA_Object::CORBA_Object (STUB_Object *protocol_proxy, TAO_ServantBase *servant, CORBA_Boolean collocated) diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i index 84a18d095ff..98ece395a43 100644 --- a/TAO/tao/Object.i +++ b/TAO/tao/Object.i @@ -83,10 +83,22 @@ CORBA_Object::_request (const CORBA::Char *operation, // ************************************************************* ACE_INLINE +CORBA_Object_var::CORBA_Object_var (void) + : ptr_ (CORBA_Object::_nil ()) +{ +} + +ACE_INLINE CORBA_Object_var::CORBA_Object_var (CORBA_Object_ptr p) - : ptr_ (p) + : ptr_ (p) {} +ACE_INLINE +CORBA_Object_var::~CORBA_Object_var (void) +{ + CORBA::release (this->ptr_); +} + ACE_INLINE CORBA_Object_ptr CORBA_Object_var::ptr (void) const { diff --git a/TAO/tao/Request.h b/TAO/tao/Request.h index 8493018c983..2b7f0e4e2e5 100644 --- a/TAO/tao/Request.h +++ b/TAO/tao/Request.h @@ -109,6 +109,74 @@ private: // protect the reference count }; +typedef CORBA_Request* CORBA_Request_ptr; + +class TAO_Export CORBA_Request_var +{ + // = TITLE + // The T_var class for Request + // + // = DESCRIPTION + // As any other pseudo object Request must have a T_var class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_Request_ptr as the _ptr type instead of + // CORBA::Request_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_Request_var (void); + CORBA_Request_var (CORBA_Request_ptr); + CORBA_Request_var (const CORBA_Request_var &); + ~CORBA_Request_var (void); + + CORBA_Request_var &operator= (CORBA_Request_ptr); + CORBA_Request_var &operator= (const CORBA_Request_var &); + CORBA_Request_ptr operator-> (void) const; + + operator const CORBA_Request_ptr &() const; + operator CORBA_Request_ptr &(); + // in, inout, out, _retn + CORBA_Request_ptr in (void) const; + CORBA_Request_ptr &inout (void); + CORBA_Request_ptr &out (void); + CORBA_Request_ptr _retn (void); + CORBA_Request_ptr ptr (void) const; + +private: + CORBA_Request_ptr ptr_; +}; + +class TAO_Export CORBA_Request_out +{ + // = TITLE + // The T_out class for Request + // + // = DESCRIPTION + // As any other pseudo object Request must have a T_out class, + // the interface an semantics are specified in the CORBA spec. + // + // = NOTE + // We use CORBA_Request_ptr as the _ptr type instead of + // CORBA::Request_ptr, this is an attempt to reduced the cyclic + // dependencies in TAO. + // +public: + CORBA_Request_out (CORBA_Request_ptr &); + CORBA_Request_out (CORBA_Request_var &); + CORBA_Request_out (CORBA_Request_out &); + CORBA_Request_out &operator= (CORBA_Request_out &); + CORBA_Request_out &operator= (const CORBA_Request_var &); + CORBA_Request_out &operator= (CORBA_Request_ptr); + operator CORBA_Request_ptr &(); + CORBA_Request_ptr &ptr (void); + CORBA_Request_ptr operator-> (void); + +private: + CORBA_Request_ptr &ptr_; +}; + #if defined (__ACE_INLINE__) # include "tao/Request.i" #endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/Request.i b/TAO/tao/Request.i index 410a8eb9d0f..6c477d16ce8 100644 --- a/TAO/tao/Request.i +++ b/TAO/tao/Request.i @@ -71,3 +71,164 @@ CORBA_Request::env (void) { return &env_; } + +// ************************************************************* +// Inline operations for class CORBA_NVList_var +// ************************************************************* + +ACE_INLINE +CORBA_Request_var::CORBA_Request_var (void) + : ptr_ (CORBA_Request::_nil ()) +{ +} + +ACE_INLINE +CORBA_Request_var::CORBA_Request_var (CORBA_Request_ptr p) + : ptr_ (p) +{} + +ACE_INLINE +CORBA_Request_var::~CORBA_Request_var (void) +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE CORBA_Request_ptr +CORBA_Request_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_Request_var::CORBA_Request_var (const CORBA_Request_var &p) + : ptr_ (CORBA_Request::_duplicate (p.ptr ())) +{} + +ACE_INLINE CORBA_Request_var & +CORBA_Request_var::operator= (CORBA_Request_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE CORBA_Request_var & +CORBA_Request_var::operator= (const CORBA_Request_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = CORBA_Request::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +CORBA_Request_var::operator const CORBA_Request_ptr &() const +{ + return this->ptr_; +} + +ACE_INLINE +CORBA_Request_var::operator CORBA_Request_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr +CORBA_Request_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr +CORBA_Request_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr & +CORBA_Request_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr & +CORBA_Request_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_Request::_nil (); + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr +CORBA_Request_var::_retn (void) +{ + // yield ownership + CORBA_Request_ptr val = this->ptr_; + this->ptr_ = CORBA_Request::_nil (); + return val; +} + +// ************************************************************* +// Inline operations for class CORBA_Request_out +// ************************************************************* + +ACE_INLINE +CORBA_Request_out::CORBA_Request_out (CORBA_Request_ptr &p) + : ptr_ (p) +{ + this->ptr_ = CORBA_Request::_nil (); +} + +ACE_INLINE +CORBA_Request_out::CORBA_Request_out (CORBA_Request_var &p) + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = CORBA_Request::_nil (); +} + +ACE_INLINE +CORBA_Request_out::CORBA_Request_out (CORBA_Request_out &p) + : ptr_ (p.ptr_) +{} + +ACE_INLINE CORBA_Request_out & +CORBA_Request_out::operator= (CORBA_Request_out &p) +{ + this->ptr_ = p.ptr_; + return *this; +} + +ACE_INLINE CORBA_Request_out & +CORBA_Request_out::operator= (const CORBA_Request_var &p) +{ + this->ptr_ = CORBA_Request::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE CORBA_Request_out & +CORBA_Request_out::operator= (CORBA_Request_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +CORBA_Request_out::operator CORBA_Request_ptr &() +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr & +CORBA_Request_out::ptr (void) +{ + return this->ptr_; +} + +ACE_INLINE CORBA_Request_ptr +CORBA_Request_out::operator-> (void) +{ + return this->ptr_; +} diff --git a/TAO/tao/deep_copy.cpp b/TAO/tao/deep_copy.cpp deleted file mode 100644 index b3ac0cd7f6d..00000000000 --- a/TAO/tao/deep_copy.cpp +++ /dev/null @@ -1,1254 +0,0 @@ -// ============================================================================ -// -// $Id$ -// -// = LIBRARY -// TAO -// -// = FILENAME -// deep_copy.cpp -// -// = DESCRIPTION -// Code for deep_copy -// The original code had a single static deep_copy function that called -// traverse to interpret the data types. This version defines a static method -// "deep_copy" on each class and avoids calling traverse. -// -// Helper routine for "Any" copy constructor ... -// -// "Deep Copy" from source to dest. Memory is always there to be -// copied to ... if this calls other deep_copy methods, it ensures that -// this remains true (only really an issue for sequences) . -// -// = AUTHOR -// Copyright 1994-1995 by Sun Microsystems Inc. -// and -// Aniruddha Gokhale -// -// ============================================================================ - -#include "tao/corba.h" - -// Deep copy from "source" to "dest" ... this code "knows" a bit about -// representations, verify it when porting to oddball platforms with -// non-IEEE floating point values or atypical byte and word sizes. - -CORBA::TypeCode::traverse_status -DEEP_COPY (CORBA::TypeCode_ptr param, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - CORBA::TypeCode::traverse_status retval = - CORBA::TypeCode::TRAVERSE_CONTINUE; - - switch (param->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - break; - case CORBA::tk_short: - case CORBA::tk_ushort: - *(CORBA::Short *) dest = *(CORBA::Short *) source; - break; - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_enum: - *(CORBA::Long *) dest = *(CORBA::Long *) source; - break; - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source; - break; - case CORBA::tk_boolean: - *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source; - break; - case CORBA::tk_char: - case CORBA::tk_octet: - *(CORBA::Char *) dest = *(CORBA::Char *) source; - break; - case CORBA::tk_longdouble: - *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source; - break; - case CORBA::tk_wchar: - *(CORBA::WChar *) dest = *(CORBA::WChar *) source; - break; - case CORBA::tk_any: - retval = TAO_Marshal_Any::deep_copy (param, source, dest, env); - break; - case CORBA::tk_TypeCode: - retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env); - break; - case CORBA::tk_Principal: - retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env); - break; - case CORBA::tk_objref: - retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env); - break; - case CORBA::tk_struct: - retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env); - break; - case CORBA::tk_union: - retval = TAO_Marshal_Union::deep_copy (param, source, dest, env); - break; - case CORBA::tk_string: - retval = TAO_Marshal_String::deep_copy (param, source, dest, env); - break; - case CORBA::tk_sequence: - retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env); - break; - case CORBA::tk_array: - retval = TAO_Marshal_Array::deep_copy (param, source, dest, env); - break; - case CORBA::tk_alias: - retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env); - break; - case CORBA::tk_except: - retval = TAO_Marshal_Except::deep_copy (param, source, dest, env); - break; - case CORBA::tk_wstring: - retval = TAO_Marshal_WString::deep_copy (param, source, dest, env); - break; - default: - retval = CORBA::TypeCode::TRAVERSE_STOP; - } // end of switch - return retval; -} - -// deep copy for primitives -CORBA::TypeCode::traverse_status -TAO_Marshal_Primitive::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - if (tc) - { - CORBA::TCKind mykind_ = tc->kind (env); - - if (env.exception () == 0) - { - switch (mykind_) - { - case CORBA::tk_char: - case CORBA::tk_octet: - *(CORBA::Octet *) dest = *(CORBA::Octet *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_short: - case CORBA::tk_ushort: - *(CORBA::Short *) dest = *(CORBA::Short *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_wchar: - *(CORBA::WChar *) dest = *(CORBA::WChar *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_enum: - *(CORBA::Long *) dest = *(CORBA::Long *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - case CORBA::tk_double: - *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_longdouble: - *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - case CORBA::tk_boolean: - *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source; - return CORBA::TypeCode::TRAVERSE_CONTINUE; - default: - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Primitive::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - dmsg ("TAO_Marshal_Primitive::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) ); - dmsg ("TAO_Marshal_Primitive::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; -} - -// deep_copy for Principal -CORBA::TypeCode::traverse_status -TAO_Marshal_Principal::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - if (tc) - { - CORBA::Principal_ptr src = - *(CORBA::Principal_ptr *) source; - - ACE_NEW_RETURN (*(CORBA::Principal_ptr *) dest, - CORBA::Principal, - CORBA::TypeCode::TRAVERSE_STOP); - - CORBA::Principal_ptr dst = *(CORBA::Principal_ptr *) dest; - - if (dst) - { - // Principals are just opaque IDs ... copy them - assert (src->id.length () <= UINT_MAX); - dst->id = src->id; - } - else - { - env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_MAYBE) ); - dmsg ("TAO_Marshal_Principal::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE) ); - dmsg ("TAO_Marshal_Primitive::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - return CORBA::TypeCode::TRAVERSE_CONTINUE; -} - -// Deep_copy structs. - -CORBA::TypeCode::traverse_status -TAO_Marshal_Struct::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - if (tc) - { - // compute the number of fields in the struct - int member_count = tc->member_count (env); - - if (env.exception () == 0) - { - CORBA::TypeCode::traverse_status retval = - CORBA::TypeCode::TRAVERSE_CONTINUE; - - for (int i = 0; - i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE; - i++) - { - // Get the typecode for the ith field. - CORBA::TypeCode_ptr param = - tc->member_type (i, env); - if (env.exception () == 0) - { - // Get the size of the field. - CORBA::Long size = param->size (env); - if (env.exception () == 0) - { - // get the alignment of the field -#if defined (TAO_NEEDS_UNUSED_VARIABLES) - CORBA::Long alignment = param->alignment (env); -#endif /* TAO_NEEDS_UNUSED_VARIABLES */ - if (env.exception () == 0) - { - switch (param->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - break; - case CORBA::tk_short: - case CORBA::tk_ushort: - *(CORBA::Short *) dest = - *(CORBA::Short *) source; - break; - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_enum: - *(CORBA::Long *) dest = - *(CORBA::Long *) source; - break; - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - *(CORBA::LongLong *) dest = - *(CORBA::LongLong *) source; - break; - case CORBA::tk_boolean: - *(CORBA::Boolean *) dest = - *(CORBA::Boolean *) source; - break; - case CORBA::tk_char: - case CORBA::tk_octet: - *(CORBA::Char *) dest = - *(CORBA::Char *) source; - break; - case CORBA::tk_longdouble: - *(CORBA::LongDouble *) dest = - *(CORBA::LongDouble *) source; - break; - case CORBA::tk_wchar: - *(CORBA::WChar *) dest = - *(CORBA::WChar *) source; - break; - case CORBA::tk_any: - retval = TAO_Marshal_Any::deep_copy (param, source, dest, env); - break; - case CORBA::tk_TypeCode: - retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env); - break; - case CORBA::tk_Principal: - retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env); - break; - case CORBA::tk_objref: - retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env); - break; - case CORBA::tk_struct: - retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env); - break; - case CORBA::tk_union: - retval = TAO_Marshal_Union::deep_copy (param, source, dest, env); - break; - case CORBA::tk_string: - retval = TAO_Marshal_String::deep_copy (param, source, dest, env); - break; - case CORBA::tk_sequence: - retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env); - break; - case CORBA::tk_array: - retval = TAO_Marshal_Array::deep_copy (param, source, dest, env); - break; - case CORBA::tk_alias: - retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env); - break; - case CORBA::tk_except: - retval = TAO_Marshal_Except::deep_copy (param, source, dest, env); - break; - case CORBA::tk_wstring: - retval = TAO_Marshal_WString::deep_copy (param, source, dest, env); - break; - default: - retval = CORBA::TypeCode::TRAVERSE_STOP; - } // end of switch - source = (char *) source + size; - dest = (char *) dest + size; - } - else // exception computing alignment - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception computing size - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception computing typecode - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } // end of loop - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - return CORBA::TypeCode::TRAVERSE_CONTINUE; - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception getting member count - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // no typecode - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} - -// Deep_copy for union. - -CORBA::TypeCode::traverse_status -TAO_Marshal_Union::deep_copy (CORBA::TypeCode_ptr tc, - const void *data, - const void *data2, - CORBA::Environment &env) -{ - CORBA::TypeCode_ptr discrim_tc = tc->discriminator_type (env); - - // Get the discriminator type. - if (env.exception () == 0) - { - // deep_copy the discriminator value. - CORBA::TypeCode::traverse_status retval = - DEEP_COPY (discrim_tc, data, data2, env); - - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - CORBA::ULong discrim_size_with_pad = - tc->TAO_discrim_pad_size (env); - - if (env.exception () == 0) - { - CORBA::TypeCode_ptr default_tc = 0; - - // Save the pointer to the discriminator. - const void *discrim_val = data; - - // value - // move the pointer to point to the actual value - data = (char *) data + discrim_size_with_pad; - data2 = (char *) data2 + discrim_size_with_pad; - - // Now get ready to marshal the actual union value. - - CORBA::Long default_index = tc->default_index (env); - if (env.exception () == 0) - { - int member_count = tc->member_count (env); - if (env.exception () == 0) - { - // check which label value matches with the - // discriminator value. Accordingly, marshal the - // corresponding member_type. If none match, - // check if default exists and marshal - // accordingly. Otherwise it is an error. - for (int i = 0; member_count-- != 0; i++) - { - CORBA::Any_ptr member_label = - tc->member_label (i, env); - if (env.exception () == 0) - { - CORBA::Boolean discrim_matched = CORBA::B_FALSE; - - // do the matching - CORBA::TypeCode_var type = member_label->type (); - switch (type->kind (env)) - { - case CORBA::tk_short: - case CORBA::tk_ushort: - if (*(CORBA::Short *) member_label->value () == - *(CORBA::Short *) discrim_val) - discrim_matched = CORBA::B_TRUE; - break; - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_enum: - if (*(CORBA::ULong *) member_label->value () == - *(CORBA::ULong *) discrim_val) - discrim_matched = CORBA::B_TRUE; - break; - case CORBA::tk_char: - if (*(CORBA::Char *) member_label->value () == - *(CORBA::Char *) discrim_val) - discrim_matched = CORBA::B_TRUE; - break; - case CORBA::tk_wchar: - if (*(CORBA::WChar *) member_label->value () == - *(CORBA::WChar *) discrim_val) - discrim_matched = CORBA::B_TRUE; - break; - case CORBA::tk_boolean: - if (*(CORBA::Boolean *) member_label->value () == - *(CORBA::Boolean *) discrim_val) - discrim_matched = CORBA::B_TRUE; - break; - default: - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_NO)); - return CORBA::TypeCode::TRAVERSE_STOP; - }// end of switch - - // get the member typecode - CORBA::TypeCode_ptr member_tc = tc->member_type (i, env); - if (env.exception () == 0) - { - if (default_index >= 0 && default_index-- == 0) - // have we reached the default label?, if so, - // save a handle to the typecode for the default - default_tc = member_tc; - if (discrim_matched) - // marshal according to the matched typecode - return DEEP_COPY (member_tc, data, - data2, env); - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } // end of while - - // we are here only if there was no match - if (default_tc) - return DEEP_COPY (default_tc, data, data2, env); - else - return CORBA::TypeCode::TRAVERSE_CONTINUE; - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} - -// Deep_copy for Sequence. - -CORBA::TypeCode::traverse_status -TAO_Marshal_Sequence::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - // Return status. - CORBA::TypeCode::traverse_status retval = - CORBA::TypeCode::TRAVERSE_CONTINUE; - - // Typecode of the element. - CORBA::TypeCode_ptr tc2; - - // Size of element. - size_t size; - CORBA::ULong bounds; - char *value1; - char *value2; - TAO_Base_Sequence *src; - TAO_Base_Sequence *dst; - - // Rely on binary format of sequences -- all are the same except for - // the type pointed to by "buffer." - - if (tc) - { - src = (CORBA::OctetSeq *) source; - dst = (CORBA::OctetSeq *) dest; - - assert (src->length_ <= UINT_MAX); - - // Get element typecode. - tc2 = tc->content_type (env); - if (env.exception () == 0) - { - // Get the size of the element. - size = tc2->size (env); - if (env.exception () == 0) - { - // Compute the length of the sequence. - bounds = src->length_; - - // Allocate a buffer to hold the sequence. - dst->_allocate_buffer (bounds); - - if (dst->buffer_) - { - value1 = (char *) src->buffer_; - value2 = (char *) dst->buffer_; - - switch (tc2->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_short: - case CORBA::tk_ushort: - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - case CORBA::tk_boolean: - case CORBA::tk_char: - case CORBA::tk_octet: - case CORBA::tk_longdouble: - case CORBA::tk_wchar: - case CORBA::tk_enum: - // just do a memcpy rather than copying each element - ACE_OS::memcpy (value2, value1, size*bounds); - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - - // handle all aggregate types here - case CORBA::tk_any: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Any::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_TypeCode: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_Principal: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Principal::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_objref: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_struct: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Struct::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_union: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Union::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_string: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Any::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - retval = - TAO_Marshal_String::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_sequence: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_array: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Array::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_alias: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Alias::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_except: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Except::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - case CORBA::tk_wstring: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_WString::deep_copy (tc2, source, dest, env); - value1 = (char *) value1 + size; - value2 = (char *) value2 + size; - } - break; - default: - retval = CORBA::TypeCode::TRAVERSE_STOP; - break; - } // end of switch - // CORBA::release (tc2); - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - return CORBA::TypeCode::TRAVERSE_CONTINUE; - else - { - // error exit - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); - dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else - { - // error exit - // CORBA::release (tc2); - env.exception (new CORBA::NO_MEMORY (CORBA::COMPLETED_MAYBE)); - dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception computing size - { - // CORBA::release (tc2); - dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception computing content type - { - dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // no typecode - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} - -// Deep_copy for Array. - -CORBA::TypeCode::traverse_status -TAO_Marshal_Array::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - // Return status. - CORBA::TypeCode::traverse_status retval = - CORBA::TypeCode::TRAVERSE_CONTINUE; - - // Typecode of the element. - CORBA::TypeCode_ptr tc2; - - // Size of element. - size_t size; - CORBA::ULong bounds; - -#if 0 - // Used only to access the marshal_object factory. - CDR stream; -#endif /* 0 */ - - // Rely on binary format of sequences -- all are the same except for - // the type pointed to by "buffer". - - if (tc) - { - bounds = tc->length (env); - if (env.exception () == 0) - { - // get element typecode - tc2 = tc->content_type (env); - if (env.exception () == 0) - { - // Get the size of the element type. - size = tc2->size (env); - if (env.exception () == 0) - { - switch (tc2->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_short: - case CORBA::tk_ushort: - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - case CORBA::tk_boolean: - case CORBA::tk_char: - case CORBA::tk_octet: - case CORBA::tk_longdouble: - case CORBA::tk_wchar: - case CORBA::tk_enum: - // Just do a memcpy rather than copying each - // element. - ACE_OS::memcpy ((char *) dest, - (char *) source, - size*bounds); - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - // handle all aggregate types here - case CORBA::tk_any: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Any::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_TypeCode: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_Principal: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Principal::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_objref: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_struct: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Struct::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_union: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Union::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_string: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Any::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - retval = - TAO_Marshal_String::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_sequence: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_array: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Array::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_alias: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Alias::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_except: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_Except::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - case CORBA::tk_wstring: - while (bounds-- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - { - retval = - TAO_Marshal_WString::deep_copy (tc2, source, dest, env); - source = (char *) source + size; - dest = (char *) dest + size; - } - break; - default: - retval = CORBA::TypeCode::TRAVERSE_STOP; - break; - } // end of switch - // CORBA::release (tc2); - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - return CORBA::TypeCode::TRAVERSE_CONTINUE; - else - { - // error exit - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_NO)); - dmsg ("marshaling TAO_Marshal_Sequence::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } // no exception computing size - else - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_STOP; - } // no exception computing content type - else - return CORBA::TypeCode::TRAVERSE_STOP; - } // bounds are fine - else - return CORBA::TypeCode::TRAVERSE_STOP; - } - else // no typecode - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} - -// deep_copy alias -CORBA::TypeCode::traverse_status -TAO_Marshal_Alias::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - // Typecode of the aliased type. - CORBA::TypeCode_ptr tc2; - // Status of deep_copy operation. - CORBA::TypeCode::traverse_status retval = - CORBA::TypeCode::TRAVERSE_CONTINUE; - - if (tc) - { - // Get element type. - tc2 = tc->content_type (env); - if (env.exception () == 0) - { - // Switch on the data type and handle the cases for - // primitives here for efficiency. - switch (tc2->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_short: - case CORBA::tk_ushort: - *(CORBA::Short *) dest = *(CORBA::Short *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_enum: - *(CORBA::Long *) dest = *(CORBA::Long *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_boolean: - *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_char: - case CORBA::tk_octet: - *(CORBA::Char *) dest = *(CORBA::Char *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_longdouble: - *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_wchar: - *(CORBA::WChar *) dest = *(CORBA::WChar *) source; - // CORBA::release (tc2); - return CORBA::TypeCode::TRAVERSE_CONTINUE; - case CORBA::tk_any: - retval = TAO_Marshal_Any::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_TypeCode: - retval = TAO_Marshal_TypeCode::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_Principal: - retval = TAO_Marshal_Principal::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_objref: - retval = TAO_Marshal_ObjRef::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_struct: - retval = TAO_Marshal_Struct::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_union: - retval = TAO_Marshal_Union::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_string: - retval = TAO_Marshal_String::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_sequence: - retval = TAO_Marshal_Sequence::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_array: - retval = TAO_Marshal_Array::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_alias: - retval = TAO_Marshal_Alias::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_except: - retval = TAO_Marshal_Except::deep_copy (tc2, source, dest, env); - break; - case CORBA::tk_wstring: - retval = TAO_Marshal_WString::deep_copy (tc2, source, dest, env); - break; - default: - // anything else is an error - retval = CORBA::TypeCode::TRAVERSE_STOP; - } - // CORBA::release (tc2); - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - return CORBA::TypeCode::TRAVERSE_CONTINUE; - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Alias::decode detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception getting content_type - return CORBA::TypeCode::TRAVERSE_STOP; - } - else // no typecode - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} - -// deep_copy structs -CORBA::TypeCode::traverse_status -TAO_Marshal_Except::deep_copy (CORBA::TypeCode_ptr tc, - const void *source, - const void *dest, - CORBA::Environment &env) -{ - CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE; - CORBA::TypeCode_ptr param; - CORBA::Long size; - - if (tc) - { - // Exceptions in memory have a "hidden" typecode up front, used - // to ensure that memory is appropriately freed and to hold the - // exception ID. We just copy that typecode. - - *(CORBA::TypeCode_ptr *) dest = - CORBA::TypeCode::_duplicate (*(CORBA::TypeCode_ptr *) source); - - // compute the number of fields in the struct - int member_count = tc->member_count (env); - if (env.exception () == 0) - { - for (int i = 0; - i < member_count - && retval == CORBA::TypeCode::TRAVERSE_CONTINUE; - i++) - { - // get the typecode for the ith field - param = tc->member_type (i, env); - if (env.exception () == 0) - { - // get the size of the field - size = param->size (env); - if (env.exception () == 0) - { - switch (param->kind_) - { - case CORBA::tk_null: - case CORBA::tk_void: - break; - case CORBA::tk_short: - case CORBA::tk_ushort: - *(CORBA::Short *) dest = *(CORBA::Short *) source; - break; - case CORBA::tk_long: - case CORBA::tk_ulong: - case CORBA::tk_float: - case CORBA::tk_enum: - *(CORBA::Long *) dest = *(CORBA::Long *) source; - break; - case CORBA::tk_double: - case CORBA::tk_longlong: - case CORBA::tk_ulonglong: - *(CORBA::LongLong *) dest = *(CORBA::LongLong *) source; - break; - case CORBA::tk_boolean: - *(CORBA::Boolean *) dest = *(CORBA::Boolean *) source; - break; - case CORBA::tk_char: - case CORBA::tk_octet: - *(CORBA::Char *) dest = *(CORBA::Char *) source; - break; - case CORBA::tk_longdouble: - *(CORBA::LongDouble *) dest = *(CORBA::LongDouble *) source; - break; - case CORBA::tk_wchar: - *(CORBA::WChar *) dest = *(CORBA::WChar *) source; - break; - case CORBA::tk_any: - retval = TAO_Marshal_Any::deep_copy (param, source, dest, env); - break; - case CORBA::tk_TypeCode: - retval = TAO_Marshal_TypeCode::deep_copy (param, source, dest, env); - break; - case CORBA::tk_Principal: - retval = TAO_Marshal_Principal::deep_copy (param, source, dest, env); - break; - case CORBA::tk_objref: - retval = TAO_Marshal_ObjRef::deep_copy (param, source, dest, env); - break; - case CORBA::tk_struct: - retval = TAO_Marshal_Struct::deep_copy (param, source, dest, env); - break; - case CORBA::tk_union: - retval = TAO_Marshal_Union::deep_copy (param, source, dest, env); - break; - case CORBA::tk_string: - retval = TAO_Marshal_String::deep_copy (param, source, dest, env); - break; - case CORBA::tk_sequence: - retval = TAO_Marshal_Sequence::deep_copy (param, source, dest, env); - break; - case CORBA::tk_array: - retval = TAO_Marshal_Array::deep_copy (param, source, dest, env); - break; - case CORBA::tk_alias: - retval = TAO_Marshal_Alias::deep_copy (param, source, dest, env); - break; - case CORBA::tk_except: - retval = TAO_Marshal_Except::deep_copy (param, source, dest, env); - break; - case CORBA::tk_wstring: - retval = TAO_Marshal_WString::deep_copy (param, source, dest, env); - break; - default: - retval = CORBA::TypeCode::TRAVERSE_STOP; - } // end of switch - source = (char *) source + size; - dest = (char *) dest + size; - } - else // exception computing size - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception computing typecode - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } // end of loop - if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) - return CORBA::TypeCode::TRAVERSE_CONTINUE; - else - { - env.exception (new CORBA::MARSHAL (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // exception getting member count - { - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } - } - else // no typecode - { - env.exception (new CORBA::BAD_TYPECODE (CORBA::COMPLETED_MAYBE)); - dmsg ("TAO_Marshal_Struct::deep_copy detected error"); - return CORBA::TypeCode::TRAVERSE_STOP; - } -} diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp index db44317a840..52a160e2890 100644 --- a/TAO/tests/Param_Test/any.cpp +++ b/TAO/tests/Param_Test/any.cpp @@ -166,8 +166,8 @@ Test_Any::run_sii_test (Param_Test_ptr objref, } int -Test_Any::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Any::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (CORBA::_tc_any, &this->in_, 0); diff --git a/TAO/tests/Param_Test/any.h b/TAO/tests/Param_Test/any.h index 1e7fcd33ea0..21c61e6bb8d 100644 --- a/TAO/tests/Param_Test/any.h +++ b/TAO/tests/Param_Test/any.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/bd_long_seq.cpp b/TAO/tests/Param_Test/bd_long_seq.cpp index 512b52a5113..bbcc675a3d2 100644 --- a/TAO/tests/Param_Test/bd_long_seq.cpp +++ b/TAO/tests/Param_Test/bd_long_seq.cpp @@ -85,8 +85,8 @@ Test_Bounded_Long_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Bounded_Long_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Bounded_Long_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Bounded_Long_Seq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/bd_long_seq.h b/TAO/tests/Param_Test/bd_long_seq.h index 60740ec451c..560e06385c7 100644 --- a/TAO/tests/Param_Test/bd_long_seq.h +++ b/TAO/tests/Param_Test/bd_long_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/bd_short_seq.cpp b/TAO/tests/Param_Test/bd_short_seq.cpp index 6bdf8c99340..eef25c72b10 100644 --- a/TAO/tests/Param_Test/bd_short_seq.cpp +++ b/TAO/tests/Param_Test/bd_short_seq.cpp @@ -88,8 +88,8 @@ Test_Bounded_Short_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Bounded_Short_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Bounded_Short_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Bounded_Short_Seq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/bd_short_seq.h b/TAO/tests/Param_Test/bd_short_seq.h index 0741df0f63b..10e45316593 100644 --- a/TAO/tests/Param_Test/bd_short_seq.h +++ b/TAO/tests/Param_Test/bd_short_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/bd_str_seq.cpp b/TAO/tests/Param_Test/bd_str_seq.cpp index 470c7d8b2f7..4fd2683ba1d 100644 --- a/TAO/tests/Param_Test/bd_str_seq.cpp +++ b/TAO/tests/Param_Test/bd_str_seq.cpp @@ -98,8 +98,8 @@ Test_Bounded_String_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Bounded_String_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Bounded_String_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Bounded_StrSeq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/bd_str_seq.h b/TAO/tests/Param_Test/bd_str_seq.h index ea21ee83b38..5e0c614dea6 100644 --- a/TAO/tests/Param_Test/bd_str_seq.h +++ b/TAO/tests/Param_Test/bd_str_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp index 3fc6acff167..87bebcc7c3f 100644 --- a/TAO/tests/Param_Test/bd_string.cpp +++ b/TAO/tests/Param_Test/bd_string.cpp @@ -99,9 +99,9 @@ Test_Bounded_String::run_sii_test (Param_Test_ptr objref, } int -Test_Bounded_String::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Bounded_String::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (CORBA::_tc_string, &this->in_, 0); CORBA::Any inout_arg (CORBA::_tc_string, &this->inout_, 0); diff --git a/TAO/tests/Param_Test/bd_string.h b/TAO/tests/Param_Test/bd_string.h index 3490d9ab138..f49038764f6 100644 --- a/TAO/tests/Param_Test/bd_string.h +++ b/TAO/tests/Param_Test/bd_string.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/bd_struct_seq.cpp b/TAO/tests/Param_Test/bd_struct_seq.cpp index 0b59ee167b9..a177068469e 100644 --- a/TAO/tests/Param_Test/bd_struct_seq.cpp +++ b/TAO/tests/Param_Test/bd_struct_seq.cpp @@ -91,9 +91,9 @@ Test_Bounded_Struct_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Bounded_Struct_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Bounded_Struct_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Bounded_StructSeq, (void *) &this->in_, 0); CORBA::Any inout_arg (Param_Test::_tc_Bounded_StructSeq, &this->inout_.inout (), 0); diff --git a/TAO/tests/Param_Test/bd_struct_seq.h b/TAO/tests/Param_Test/bd_struct_seq.h index 2ab6181926a..1684795a9da 100644 --- a/TAO/tests/Param_Test/bd_struct_seq.h +++ b/TAO/tests/Param_Test/bd_struct_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp index e704adba847..c136c2aa8db 100644 --- a/TAO/tests/Param_Test/client.cpp +++ b/TAO/tests/Param_Test/client.cpp @@ -120,13 +120,9 @@ Param_Test_Client<T>::run_sii_test (void) template <class T> int Param_Test_Client<T>::run_dii_test (void) { - CORBA::ULong i; // loop index - CORBA::Request_ptr req; // DII request const char *opname = this->test_object_->opname (); Options *opt = OPTIONS::instance (); CORBA::Environment env; // environment - CORBA::NVList_ptr nvlist; // argument list for DII parameters - CORBA::NVList_ptr retval; // to access the NamedValue that stores the result // initialize call count and error count this->results_.call_count (0); @@ -141,7 +137,7 @@ Param_Test_Client<T>::run_dii_test (void) opname), -1); // Make the calls in a loop. - for (i = 0; i < opt->loop_count (); i++) + for (CORBA::ULong i = 0; i < opt->loop_count (); i++) { this->results_.call_count (this->results_.call_count () + 1); @@ -150,12 +146,18 @@ Param_Test_Client<T>::run_dii_test (void) this->results_.start_timer (); // first create the argument list (length 0 because args are *added*) + CORBA::NVList_ptr nvlist; + this->orb_->create_list (0, nvlist); + // then the result holder (length 1 because value is *replaced*) - this->orb_->create_list (1, retval); + CORBA::NVList_var retval; + this->orb_->create_list (1, retval.out ()); // add arguments and typecode for return valueto the NVList - if (this->test_object_->add_args (nvlist, retval, env) == -1) + if (this->test_object_->add_args (nvlist, + retval.in (), + env) == -1) { this->results_.error_count (this->results_.error_count () + 1); env.print_exception (opname); @@ -167,10 +169,13 @@ Param_Test_Client<T>::run_dii_test (void) } // create the request + CORBA::Request_var req; + CORBA::NamedValue_ptr result = + CORBA::NamedValue::_duplicate (retval->item (0, env)); this->param_test_->_create_request (opname, nvlist, - retval->item (0, env), - req, + result, + req.out (), 0, //CORBA::OUT_LIST_MEMORY, env); // The OUT_LIST_MEMORY is to be used when the ORB assumes that @@ -187,7 +192,6 @@ Param_Test_Client<T>::run_dii_test (void) { this->results_.error_count (this->results_.error_count () + 1); req->env ()->print_exception (opname); - CORBA::release (req); continue; } @@ -197,18 +201,15 @@ Param_Test_Client<T>::run_dii_test (void) this->test_object_->print_values (); } // now check if the values returned are as expected - if (!this->test_object_->check_validity (req)) + if (!this->test_object_->check_validity (req.in ())) { this->results_.error_count (this->results_.error_count () + 1); ACE_ERROR ((LM_ERROR, "(%N:%l) client.cpp - " "Invalid results in run_dii_test in iteration %d", i)); - CORBA::release (req); continue; } - // release the request - CORBA::release (req); // stop the this->results_. this->results_.stop_timer (); diff --git a/TAO/tests/Param_Test/fixed_array.cpp b/TAO/tests/Param_Test/fixed_array.cpp index f34294436b3..d8370828d54 100644 --- a/TAO/tests/Param_Test/fixed_array.cpp +++ b/TAO/tests/Param_Test/fixed_array.cpp @@ -84,8 +84,8 @@ Test_Fixed_Array::run_sii_test (Param_Test_ptr objref, } int -Test_Fixed_Array::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Fixed_Array::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { // We provide the top level memory diff --git a/TAO/tests/Param_Test/fixed_array.h b/TAO/tests/Param_Test/fixed_array.h index 994e3d07980..fc1f8ee5cc3 100644 --- a/TAO/tests/Param_Test/fixed_array.h +++ b/TAO/tests/Param_Test/fixed_array.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/fixed_struct.cpp b/TAO/tests/Param_Test/fixed_struct.cpp index e781e449ef7..de3f5bdb3cf 100644 --- a/TAO/tests/Param_Test/fixed_struct.cpp +++ b/TAO/tests/Param_Test/fixed_struct.cpp @@ -74,8 +74,8 @@ Test_Fixed_Struct::run_sii_test (Param_Test_ptr objref, } int -Test_Fixed_Struct::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Fixed_Struct::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { // We provide the top level memory diff --git a/TAO/tests/Param_Test/fixed_struct.h b/TAO/tests/Param_Test/fixed_struct.h index 75896d967fe..5e855e6e608 100644 --- a/TAO/tests/Param_Test/fixed_struct.h +++ b/TAO/tests/Param_Test/fixed_struct.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp index 81f367c0386..5d588f174e9 100644 --- a/TAO/tests/Param_Test/nested_struct.cpp +++ b/TAO/tests/Param_Test/nested_struct.cpp @@ -92,9 +92,9 @@ Test_Nested_Struct::run_sii_test (Param_Test_ptr objref, } int -Test_Nested_Struct::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Nested_Struct::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Nested_Struct, (void *) &this->in_, 0); CORBA::Any inout_arg (Param_Test::_tc_Nested_Struct, &this->inout_.inout (), 0); diff --git a/TAO/tests/Param_Test/nested_struct.h b/TAO/tests/Param_Test/nested_struct.h index 29e6d52c898..e1c03654ed5 100644 --- a/TAO/tests/Param_Test/nested_struct.h +++ b/TAO/tests/Param_Test/nested_struct.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/objref.cpp b/TAO/tests/Param_Test/objref.cpp index 8de443cb568..727d4cd97e9 100644 --- a/TAO/tests/Param_Test/objref.cpp +++ b/TAO/tests/Param_Test/objref.cpp @@ -115,9 +115,9 @@ Test_ObjRef::run_sii_test (Param_Test_ptr objref, } int -Test_ObjRef::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_ObjRef::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (_tc_Coffee, &this->in_, 0); CORBA::Any inout_arg (_tc_Coffee, &this->inout_, 0); @@ -140,39 +140,42 @@ CORBA::Boolean Test_ObjRef::check_validity (void) { CORBA::Environment env; - char // attribute names - *in, - *inout, - *out, - *ret; - in = this->in_->description (env)->name; + Coffee::Desc_var in_desc = + this->in_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return 0; } + char* in = in_desc->name; - inout = this->inout_->description (env)->name; + Coffee::Desc_var inout_desc = + this->inout_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return 0; } + char* inout = inout_desc->name; - out = this->out_->description (env)->name; + Coffee::Desc_var out_desc = + this->out_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return 0; } + char* out = out_desc->name; - ret = this->ret_->description (env)->name; + Coffee::Desc_var ret_desc = + this->out_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return 0; } + char* ret = ret_desc->name; // now compare them if (!ACE_OS::strcmp (in, inout) && @@ -218,39 +221,43 @@ void Test_ObjRef::print_values (void) { CORBA::Environment env; - char // attribute names - *in, - *inout, - *out, - *ret; - in = this->in_->description (env)->name; + Coffee::Desc_var in_desc = + this->in_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return; } + char* in = in_desc->name; - inout = this->inout_->description (env)->name; + Coffee::Desc_var inout_desc = + this->inout_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return; } + char* inout = inout_desc->name; - out = this->out_->description (env)->name; + Coffee::Desc_var out_desc = + this->out_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return; } + char* out = out_desc->name; - ret = this->ret_->description (env)->name; + Coffee::Desc_var ret_desc = + this->out_->description (env); if (env.exception ()) { env.print_exception ("retrieving description"); return; } + char* ret = ret_desc->name; + ACE_DEBUG ((LM_DEBUG, "\n=*=*=*=*=*=*" diff --git a/TAO/tests/Param_Test/objref.h b/TAO/tests/Param_Test/objref.h index 0e4d21d12f5..8b95f005e3c 100644 --- a/TAO/tests/Param_Test/objref.h +++ b/TAO/tests/Param_Test/objref.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/short.cpp b/TAO/tests/Param_Test/short.cpp index 7b25d0f52a2..66076f5e62f 100644 --- a/TAO/tests/Param_Test/short.cpp +++ b/TAO/tests/Param_Test/short.cpp @@ -74,8 +74,8 @@ Test_Short::run_sii_test (Param_Test_ptr objref, } int -Test_Short::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Short::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { // we provide top level memory to the ORB to retrieve the data diff --git a/TAO/tests/Param_Test/short.h b/TAO/tests/Param_Test/short.h index a6ba4799583..409bd805177 100644 --- a/TAO/tests/Param_Test/short.h +++ b/TAO/tests/Param_Test/short.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/typecode.cpp b/TAO/tests/Param_Test/typecode.cpp index e0880b85bdc..4c4e0e7551e 100644 --- a/TAO/tests/Param_Test/typecode.cpp +++ b/TAO/tests/Param_Test/typecode.cpp @@ -89,9 +89,9 @@ Test_TypeCode::run_sii_test (Param_Test_ptr objref, } int -Test_TypeCode::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_TypeCode::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { return 0; } diff --git a/TAO/tests/Param_Test/typecode.h b/TAO/tests/Param_Test/typecode.h index c6f39c14241..1791c6e5aef 100644 --- a/TAO/tests/Param_Test/typecode.h +++ b/TAO/tests/Param_Test/typecode.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_any_seq.cpp b/TAO/tests/Param_Test/ub_any_seq.cpp index a387af2bc2c..c603c4bb1d4 100644 --- a/TAO/tests/Param_Test/ub_any_seq.cpp +++ b/TAO/tests/Param_Test/ub_any_seq.cpp @@ -165,8 +165,8 @@ Test_AnySeq::run_sii_test (Param_Test_ptr objref, } int -Test_AnySeq::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_AnySeq::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_AnySeq, (void *) &this->in_, 0); diff --git a/TAO/tests/Param_Test/ub_any_seq.h b/TAO/tests/Param_Test/ub_any_seq.h index d7850f6d9d7..878ce9d09e5 100644 --- a/TAO/tests/Param_Test/ub_any_seq.h +++ b/TAO/tests/Param_Test/ub_any_seq.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_long_seq.cpp b/TAO/tests/Param_Test/ub_long_seq.cpp index bfca9e1a137..d5510035c47 100644 --- a/TAO/tests/Param_Test/ub_long_seq.cpp +++ b/TAO/tests/Param_Test/ub_long_seq.cpp @@ -87,8 +87,8 @@ Test_Long_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Long_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Long_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Long_Seq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/ub_long_seq.h b/TAO/tests/Param_Test/ub_long_seq.h index 27d0f6d33a8..3d68edce63c 100644 --- a/TAO/tests/Param_Test/ub_long_seq.h +++ b/TAO/tests/Param_Test/ub_long_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_objref_seq.cpp b/TAO/tests/Param_Test/ub_objref_seq.cpp index 93e18b05ad7..fafb6213e1c 100644 --- a/TAO/tests/Param_Test/ub_objref_seq.cpp +++ b/TAO/tests/Param_Test/ub_objref_seq.cpp @@ -116,8 +116,8 @@ Test_ObjRef_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_ObjRef_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_ObjRef_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Coffee_Mix, (void *) &this->in_, 0); diff --git a/TAO/tests/Param_Test/ub_objref_seq.h b/TAO/tests/Param_Test/ub_objref_seq.h index 78e13f8fe8c..43b572a551b 100644 --- a/TAO/tests/Param_Test/ub_objref_seq.h +++ b/TAO/tests/Param_Test/ub_objref_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_short_seq.cpp b/TAO/tests/Param_Test/ub_short_seq.cpp index 6f164a0c1ba..3aa0d249969 100644 --- a/TAO/tests/Param_Test/ub_short_seq.cpp +++ b/TAO/tests/Param_Test/ub_short_seq.cpp @@ -90,8 +90,8 @@ Test_Short_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Short_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Short_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Short_Seq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/ub_short_seq.h b/TAO/tests/Param_Test/ub_short_seq.h index 87ae64745f2..96c37beeb48 100644 --- a/TAO/tests/Param_Test/ub_short_seq.h +++ b/TAO/tests/Param_Test/ub_short_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp index 1655358c54f..ec487e05059 100644 --- a/TAO/tests/Param_Test/ub_str_seq.cpp +++ b/TAO/tests/Param_Test/ub_str_seq.cpp @@ -103,8 +103,8 @@ Test_String_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_String_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_String_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_StrSeq, (void *) &this->in_.in (), 0); diff --git a/TAO/tests/Param_Test/ub_str_seq.h b/TAO/tests/Param_Test/ub_str_seq.h index 010a30ceb69..cefe6f96eb6 100644 --- a/TAO/tests/Param_Test/ub_str_seq.h +++ b/TAO/tests/Param_Test/ub_str_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_string.cpp b/TAO/tests/Param_Test/ub_string.cpp index cbca89185fa..8eb57429f7b 100644 --- a/TAO/tests/Param_Test/ub_string.cpp +++ b/TAO/tests/Param_Test/ub_string.cpp @@ -99,9 +99,9 @@ Test_Unbounded_String::run_sii_test (Param_Test_ptr objref, } int -Test_Unbounded_String::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Unbounded_String::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (CORBA::_tc_string, &this->in_, 0); CORBA::Any inout_arg (CORBA::_tc_string, &this->inout_, 0); diff --git a/TAO/tests/Param_Test/ub_string.h b/TAO/tests/Param_Test/ub_string.h index 6538a7a9bd5..18bb253fd3a 100644 --- a/TAO/tests/Param_Test/ub_string.h +++ b/TAO/tests/Param_Test/ub_string.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/ub_struct_seq.cpp b/TAO/tests/Param_Test/ub_struct_seq.cpp index 11a510da242..f807f427abc 100644 --- a/TAO/tests/Param_Test/ub_struct_seq.cpp +++ b/TAO/tests/Param_Test/ub_struct_seq.cpp @@ -91,8 +91,8 @@ Test_Struct_Sequence::run_sii_test (Param_Test_ptr objref, } int -Test_Struct_Sequence::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, +Test_Struct_Sequence::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_StructSeq, (void *) &this->in_, 0); diff --git a/TAO/tests/Param_Test/ub_struct_seq.h b/TAO/tests/Param_Test/ub_struct_seq.h index 26b8a333490..92348e1cfcc 100644 --- a/TAO/tests/Param_Test/ub_struct_seq.h +++ b/TAO/tests/Param_Test/ub_struct_seq.h @@ -38,8 +38,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/var_array.cpp b/TAO/tests/Param_Test/var_array.cpp index de50a334b19..71758111d93 100644 --- a/TAO/tests/Param_Test/var_array.cpp +++ b/TAO/tests/Param_Test/var_array.cpp @@ -82,9 +82,9 @@ Test_Var_Array::run_sii_test (Param_Test_ptr objref, } int -Test_Var_Array::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Var_Array::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { // We provide the top level memory // the Any does not own any of these diff --git a/TAO/tests/Param_Test/var_array.h b/TAO/tests/Param_Test/var_array.h index 6a716f4e88d..51abada9541 100644 --- a/TAO/tests/Param_Test/var_array.h +++ b/TAO/tests/Param_Test/var_array.h @@ -37,8 +37,8 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp index b867b696542..ff49698d418 100644 --- a/TAO/tests/Param_Test/var_struct.cpp +++ b/TAO/tests/Param_Test/var_struct.cpp @@ -94,9 +94,9 @@ Test_Var_Struct::run_sii_test (Param_Test_ptr objref, } int -Test_Var_Struct::add_args (CORBA::NVList_ptr ¶m_list, - CORBA::NVList_ptr &retval, - CORBA::Environment &env) +Test_Var_Struct::add_args (CORBA::NVList_ptr param_list, + CORBA::NVList_ptr retval, + CORBA::Environment &env) { CORBA::Any in_arg (Param_Test::_tc_Var_Struct, (void *) &this->in_, 0); CORBA::Any inout_arg (Param_Test::_tc_Var_Struct, &this->inout_.inout (), 0); diff --git a/TAO/tests/Param_Test/var_struct.h b/TAO/tests/Param_Test/var_struct.h index a3168eca57a..21e6e08900e 100644 --- a/TAO/tests/Param_Test/var_struct.h +++ b/TAO/tests/Param_Test/var_struct.h @@ -38,11 +38,10 @@ public: CORBA::Environment &env); // run the SII test - int add_args (CORBA::NVList_ptr &nvlist, - CORBA::NVList_ptr &retval, + int add_args (CORBA::NVList_ptr nvlist, + CORBA::NVList_ptr retval, CORBA::Environment &env); // add args to NVList for DII - const char *opname (void) const; // return operation name |