diff options
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 75 | ||||
-rw-r--r-- | TAO/tao/LocalObject.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/LocalObject.h | 8 | ||||
-rw-r--r-- | TAO/tao/LocalObject.i | 3 | ||||
-rw-r--r-- | TAO/tao/Object.cpp | 80 | ||||
-rw-r--r-- | TAO/tao/Object.h | 74 | ||||
-rw-r--r-- | TAO/tao/Object.i | 115 |
7 files changed, 226 insertions, 142 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 071a63f4627..d52773f39f7 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,70 @@ +Tue Mar 5 23:47:17 2002 Ossama Othman <ossama@uci.edu> + + * tao/Object.h: + + No need to include "Object_Proxy_Broker.h". Forward declaring + the TAO_Object_Proxy_Broker class is enough. This should + improve overall compile times slightly. + + (_incr_refcnt, _decr_refcnt, refcount_lock_, refcount_): + + Removed these CORBA::Object class members. They are no longer + used. See below. + + * tao/Object.i (_incr_refcnt, _decr_refcnt): + + Removed these internally used methods. All reference counting + is now deferred to the underlying TAO_Stub object. + + * tao/Object.cpp (CORBA_Object): + + Fixed bug where the CORBA::Object instance be considered to be + one that points to an unconstrained object instead of the + locality-constrained one. If the TAO_Stub pointer parameter is + zero then the CORBA::Object instance represents a + locality-constrained object. Set the "is_local_" member + appropriately. + + If the object is locality-constrained then do not attempt to + initialize a remote proxy broker. + + (add_ref, remove_ref): + + Defer reference counting to the underlying TAO_Stub object. + There is no need for the CORBA::Object class to maintain a + separate reference count. This reduces memory requirements + slightly, in addition to improving object reference creation + times for both unconstrained objects and locality-constrained + objects (e.g. one lock initialization -- not acquisition -- + instead of two). + + These changes are part of an optimization for creation of + locality-constrained objects. This is particularly useful for + locality-constrained objects that are instantiated in the + critical a path, such as the Portable Interceptor "RequestInfo" + objects. [Bug 874] + + (_hash): + + Added an implementation for locality-constrained objects. It + isn't strictly needed, but better to be consistent. + + * tao/LocalObject.h (TAO_Local_RefCounted_Object): + + Added reference counting (lock and count variable) to this + class. It no longer relies on the CORBA::Object base class + reference counting. + + * tao/LocalObject.i (TAO_Local_RefCounted_Object): + + Initialize the reference counting lock and count variable + appropriately. + + * tao/LocalObject.cpp (_add_ref, _remove_ref): + + Implemented these methods in the TAO_Local_RefCounted_Object + class using the newly added lock and reference count variable. + Tue Mar 05 19:16:22 2002 Jaiganesh Balasubramanian <jai@doc.ece.uci.edu> * docs\tutorials\Quoter\AMI\server.dsp: @@ -34,7 +101,7 @@ Tue Mar 05 19:16:22 2002 Jaiganesh Balasubramanian <jai@doc.ece.uci.edu> * orbsvcs/performance-tests/EC_Latency/client.dsp: * orbsvcs/performance-tests/EC_Latency/server.dsp: * orbsvcs/performance-tests/EC_Federated_Latency/client.dsp: - * orbsvcs/performance-tests/EC_Federated_Latency/server.dsp: + * orbsvcs/performance-tests/EC_Federated_Latency/server.dsp: * orbsvcs/performance-tests/EC_Federated_Scalability/client.dsp: * orbsvcs/performance-tests/EC_Federated_Scalability/server.dsp: * orbsvcs/performance-tests/EC_Latency/client.dsp: @@ -66,9 +133,8 @@ Tue Mar 05 19:16:22 2002 Jaiganesh Balasubramanian <jai@doc.ece.uci.edu> * orbsvcs/tests/Event/Performance/Latency.dsp: * orbsvcs/tests/Event/Performance/Latency_Server.dsp: * orbsvcs/tests/Event/Performance/Throughput.dsp: - * - orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.dsp: - * performance-tests/Callback/client.dsp: + * orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.dsp: + * performance-tests/Callback/client.dsp: * performance-tests/Callback/server.dsp: * performance-tests/Latency/AMI/client.dsp: * performance-tests/Latency/AMI/server.dsp: @@ -163,7 +229,6 @@ Tue Mar 5 15:21:51 2002 Carlos O'Ryan <coryan@uci.edu> * orbsvcs/performance-tests/RTEvent/Roundtrip/run_dispatching.sh: Add a simple test driver - Tue Mar 5 11:37:52 2002 Jaiganesh Balasubramanian <jai@doc.ece.uci.edu> * orbsvcs/orbsvcs/Makefile: diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp index 6188a7f0763..a6cfb29fc1d 100644 --- a/TAO/tao/LocalObject.cpp +++ b/TAO/tao/LocalObject.cpp @@ -171,13 +171,22 @@ CORBA_LocalObject::_get_implementation (ACE_ENV_SINGLE_ARG_DECL) void TAO_Local_RefCounted_Object::_add_ref (void) { - this->_incr_refcnt (); + ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->refcount_lock_); + this->refcount_++; } void TAO_Local_RefCounted_Object::_remove_ref (void) { - this->_decr_refcnt (); + { + ACE_GUARD (TAO_SYNCH_MUTEX, mon, this->refcount_lock_); + this->refcount_--; + + if (this->refcount_ != 0) + return; + } + + delete this; } #if (TAO_HAS_CORBA_MESSAGING == 1) diff --git a/TAO/tao/LocalObject.h b/TAO/tao/LocalObject.h index acac9399955..f7d35a3ca13 100644 --- a/TAO/tao/LocalObject.h +++ b/TAO/tao/LocalObject.h @@ -266,6 +266,14 @@ private: TAO_Local_RefCounted_Object &operator = (const TAO_Local_RefCounted_Object &); //@} +protected: + + /// Mutex to protect reference count. + TAO_SYNCH_MUTEX refcount_lock_; + + /// Number of outstanding references to this object. + CORBA::ULong refcount_; + }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/LocalObject.i b/TAO/tao/LocalObject.i index 9a10edac5c2..7f27ffaaa20 100644 --- a/TAO/tao/LocalObject.i +++ b/TAO/tao/LocalObject.i @@ -58,7 +58,8 @@ CORBA_LocalObject::CORBA_LocalObject (void) ACE_INLINE TAO_Local_RefCounted_Object::TAO_Local_RefCounted_Object (void) - // : CORBA_LocalObject () + : refcount_lock_ (), + refcount_ (1) { } diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 611f44e72d6..e2233178c4f 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -21,14 +21,16 @@ # include "tao/Object.i" #endif /* ! __ACE_INLINE__ */ -ACE_RCSID(tao, Object, "$Id$") +ACE_RCSID (tao, + Object, + "$Id$") int CORBA_Object::_tao_class_id = 0; CORBA_Object::~CORBA_Object (void) { if (this->protocol_proxy_) - this->protocol_proxy_->_decr_refcnt (); + (void) this->protocol_proxy_->_decr_refcnt (); } CORBA_Object::CORBA_Object (TAO_Stub *protocol_proxy, @@ -36,41 +38,54 @@ CORBA_Object::CORBA_Object (TAO_Stub *protocol_proxy, TAO_Abstract_ServantBase *servant) : is_collocated_ (collocated), servant_ (servant), - is_local_ (0), - protocol_proxy_ (protocol_proxy), - refcount_ (1), - refcount_lock_ () + is_local_ (protocol_proxy == 0 ? 1 : 0), + proxy_broker_ (0), + protocol_proxy_ (protocol_proxy) { - // Notice that the refcount_ above is initialized to 1 because - // the semantics of CORBA Objects are such that obtaining one - // implicitly takes a reference. - - // If the object is collocated then set the broker - // using the factory otherwise use the remote proxy - // broker. - if (this->is_collocated_ && - _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer != 0) - this->proxy_broker_ = _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer (this); - else - this->proxy_broker_ = the_tao_remote_object_proxy_broker (); + + if (protocol_proxy != 0) + { + // If the object is collocated then set the broker using the + // factory otherwise use the remote proxy broker. + if (this->is_collocated_ && + _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer != 0) + this->proxy_broker_ = _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer (this); + else + this->proxy_broker_ = the_tao_remote_object_proxy_broker (); + + // Make sure the underlying TAO_Stub object is not yanked out + // from under us. This will bring the TAO_Stub reference count + // up to at least 2. + (void) protocol_proxy->_incr_refcnt (); + } } void CORBA_Object::_add_ref (void) { - this->_incr_refcnt (); + if (this->protocol_proxy_ != 0) + (void) this->protocol_proxy_->_incr_refcnt (); } void CORBA_Object::_remove_ref (void) { - this->_decr_refcnt (); + // Note that we check if the reference count in the TAO_Stub is one + // instead of zero since the reference count was increased by one in + // the CORBA::Object constructor. This object's destructor cleans + // up the remaining TAO_Stub reference (that cleanup should not be + // done here). + if (this->protocol_proxy_ != 0 + && this->protocol_proxy_->_decr_refcnt () == 1) + { + delete this; + } } void CORBA_Object::_tao_any_destructor (void *x) { - CORBA_Object_ptr tmp = ACE_static_cast(CORBA_Object_ptr,x); + CORBA::Object_ptr tmp = ACE_static_cast (CORBA::Object_ptr, x); CORBA::release (tmp); } @@ -143,9 +158,6 @@ CORBA_Object::_is_local (void) const return this->is_local_; } -// Quickly hash an object reference's representation data. Used to -// create hash tables. - CORBA::ULong CORBA_Object::_hash (CORBA::ULong maximum ACE_ENV_ARG_DECL) @@ -153,16 +165,18 @@ CORBA_Object::_hash (CORBA::ULong maximum if (this->protocol_proxy_ != 0) return this->protocol_proxy_->hash (maximum ACE_ENV_ARG_PARAMETER); else - // @@ I really don't know how to support this for - // a locality constrained object. -- nw. - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); -} + { + // Locality-constrained object. -// Compare two object references to see if they point to the same -// object. Used in linear searches, as in hash buckets. -// -// XXX would be useful to also have a trivalued comparison predicate, -// such as strcmp(), to allow more comparison algorithms. + // Note that we reinterpret_cast to an "unsigned long" instead + // of CORBA::ULong since we need to first cast to an integer + // large enough to hold an address to avoid compile-time + // warnings on some 64-bit platforms. + CORBA::ULong hash = ACE_reinterpret_cast (unsigned long, this); + + return hash % maximum; + } +} CORBA::Boolean CORBA_Object::_is_equivalent (CORBA_Object_ptr other_obj diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h index 9f1db03fd5c..23635f48401 100644 --- a/TAO/tao/Object.h +++ b/TAO/tao/Object.h @@ -1,4 +1,4 @@ -// This may look like C, but it's really -*- C++ -*- +// -*- C++ -*- //============================================================================= /** @@ -6,62 +6,70 @@ * * $Id$ * - * Header file for Win32 interface to CORBA's base "Object" type. - * * A "Object" is an entity that can be the target of an invocation * using an ORB. All CORBA objects provide this functionality. - * See the CORBA 2.0 specification for details. - * + * See the CORBA 2.6 specification for details. * * @author Portions Copyright 1994-1995 by Sun Microsystems Inc. - * @author Portions Copyright 1997 by Washington University + * @author Portions Copyright 1997-2002 by Washington University */ //============================================================================= #ifndef TAO_CORBA_OBJECT_H #define TAO_CORBA_OBJECT_H + #include "ace/pre.h" #include "tao/corbafwd.h" -#include "tao/Object_Proxy_Broker.h" -#include "tao/Policy_ForwardC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -class TAO_Stub; +#include "tao/Policy_ForwardC.h" +class TAO_Stub; class TAO_Abstract_ServantBase; +class TAO_Object_Proxy_Broker; +/** + * @class CORBA::Object + * + * @brief Implementation of a CORBA object reference. + * + * All CORBA objects, both unconstrained and locality-constrained, + * inherit from this class. The interface is defined in the CORBA + * specification and the C++ mapping. + */ class TAO_Export CORBA_Object { public: + /// Destructor. virtual ~CORBA_Object (void); - /// Address of this variable used in <_unchecked_narrow>. + /// Address of this variable used in _unchecked_narrow(). static int _tao_class_id; /// Increment the ref count. - static CORBA_Object_ptr _duplicate (CORBA_Object_ptr obj); + static CORBA::Object_ptr _duplicate (CORBA::Object_ptr obj); /// Return a NULL object. - static CORBA_Object_ptr _nil (void); + static CORBA::Object_ptr _nil (void); /// No-op it is just here to simplify some templates. ACE_INLINE_FOR_GNUC - static CORBA_Object_ptr _narrow (CORBA_Object_ptr obj - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - static CORBA_Object_ptr _unchecked_narrow (CORBA_Object_ptr obj - ACE_ENV_ARG_DECL_WITH_DEFAULTS); + static CORBA::Object_ptr _narrow (CORBA_Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS); + static CORBA::Object_ptr _unchecked_narrow (CORBA_Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS); /// Used in the implementation of CORBA::Any static void _tao_any_destructor (void*); /// Uninlined part of the now-inlined CORBA::is_nil(). - static CORBA::Boolean is_nil_i (CORBA_Object_ptr obj); + static CORBA::Boolean is_nil_i (CORBA::Object_ptr obj); // These calls correspond to over-the-wire operations, or at least // do so in many common cases. The normal implementation assumes a @@ -171,7 +179,7 @@ public: ACE_ENV_ARG_DECL_WITH_DEFAULTS); /** - * Try to determine if this object is the same as <other_obj>. This + * Try to determine if this object is the same as other_obj. This * method relies on the representation of the object reference's * private state. Since that changes easily (when different ORB * protocols are in use) there is no default implementation. @@ -225,15 +233,17 @@ public: virtual TAO_Object_Proxy_Broker *_proxy_broker (void); protected: + /// Initializing a local object. CORBA_Object (int dummy); - // = Internal Reference count managment. - /// Increment the reference count. - CORBA::ULong _incr_refcnt (void); +private: - /// Decrement the reference count. - CORBA::ULong _decr_refcnt (void); + // = Unimplemented methods + CORBA_Object (const CORBA_Object &); + CORBA_Object &operator = (const CORBA_Object &); + +protected: /// Flag to indicate collocation. It is 0 except for collocated /// objects. @@ -253,6 +263,7 @@ protected: TAO_Object_Proxy_Broker *proxy_broker_; private: + /** * Pointer to the protocol-specific "object" containing important * profiling information regarding this proxy. @@ -261,16 +272,6 @@ private: */ TAO_Stub *protocol_proxy_; - /// Number of outstanding references to this object. - CORBA::ULong refcount_; - - /// Protect the reference count, this is OK because we do no - /// duplicates or releases on the critical path. - TAO_SYNCH_MUTEX refcount_lock_; - - // = Unimplemented methods - CORBA_Object (const CORBA_Object &); - CORBA_Object &operator = (const CORBA_Object &); }; class TAO_Export CORBA_Object_var @@ -322,12 +323,12 @@ private: }; -extern TAO_Export TAO_Object_Proxy_Broker * (*_TAO_collocation_Object_Proxy_Broker_Factory_function_pointer) ( +/// This function pointer is set only when the Portable server library +/// is present. +extern TAO_Export TAO_Object_Proxy_Broker * (*_TAO_collocation_Object_Proxy_Broker_Factory_function_pointer) ( CORBA::Object_ptr obj ); -// This function pointer is set only when the Portable server library is -// present. TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR&, const CORBA_Object*); @@ -335,6 +336,7 @@ operator<< (TAO_OutputCDR&, const CORBA_Object*); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR&, CORBA_Object*&); + #if defined (__ACE_INLINE__) # include "tao/Object.i" #endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/Object.i b/TAO/tao/Object.i index 16661b8d8c8..e635c63ad59 100644 --- a/TAO/tao/Object.i +++ b/TAO/tao/Object.i @@ -1,3 +1,5 @@ +// -*- C++ -*- +// // $Id$ // **************************************************************** @@ -8,35 +10,12 @@ CORBA_Object::CORBA_Object (int) servant_ (0), is_local_ (1), proxy_broker_ (0), - protocol_proxy_ (0), - refcount_ (1), - refcount_lock_ () + protocol_proxy_ (0) { } -ACE_INLINE CORBA::ULong -CORBA_Object::_incr_refcnt (void) -{ - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->refcount_lock_, 0); - return this->refcount_++; -} - -ACE_INLINE CORBA::ULong -CORBA_Object::_decr_refcnt (void) -{ - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->refcount_lock_, 0); - this->refcount_--; - if (this->refcount_ != 0) - return this->refcount_; - } - - delete this; - return 0; -} - -ACE_INLINE CORBA_Object_ptr -CORBA_Object::_duplicate (CORBA_Object_ptr obj) +ACE_INLINE CORBA::Object_ptr +CORBA_Object::_duplicate (CORBA::Object_ptr obj) { if (obj) obj->_add_ref (); @@ -47,14 +26,14 @@ CORBA_Object::_duplicate (CORBA_Object_ptr obj) // These are in CORBA namespace ACE_INLINE void -CORBA::release (CORBA_Object_ptr obj) +CORBA::release (CORBA::Object_ptr obj) { if (obj) obj->_remove_ref (); } ACE_INLINE CORBA::Boolean -CORBA::is_nil (CORBA_Object_ptr obj) +CORBA::is_nil (CORBA::Object_ptr obj) { if (obj == 0) { @@ -68,14 +47,15 @@ CORBA::is_nil (CORBA_Object_ptr obj) // Null pointers represent nil objects. -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object::_nil (void) { return 0; } -ACE_INLINE CORBA_Object_ptr -CORBA_Object::_unchecked_narrow (CORBA_Object_ptr obj ACE_ENV_ARG_DECL_NOT_USED) +ACE_INLINE CORBA::Object_ptr +CORBA_Object::_unchecked_narrow (CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_NOT_USED) { if (CORBA::is_nil (obj)) return CORBA::Object::_nil (); @@ -90,10 +70,12 @@ CORBA_Object::_unchecked_narrow (CORBA_Object_ptr obj ACE_ENV_ARG_DECL_NOT_USED) return CORBA::Object::_duplicate (obj); } -ACE_INLINE CORBA_Object_ptr -CORBA_Object::_narrow (CORBA_Object_ptr obj ACE_ENV_ARG_DECL) +ACE_INLINE CORBA::Object_ptr +CORBA_Object::_narrow (CORBA::Object_ptr obj + ACE_ENV_ARG_DECL) { - return CORBA_Object::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER); + return CORBA_Object::_unchecked_narrow (obj + ACE_ENV_ARG_PARAMETER); } ACE_INLINE TAO_Stub * @@ -113,9 +95,10 @@ CORBA_Object_var::CORBA_Object_var (void) } ACE_INLINE -CORBA_Object_var::CORBA_Object_var (CORBA_Object_ptr p) +CORBA_Object_var::CORBA_Object_var (CORBA::Object_ptr p) : ptr_ (p) -{} +{ +} ACE_INLINE CORBA_Object_var::~CORBA_Object_var (void) @@ -123,19 +106,20 @@ CORBA_Object_var::~CORBA_Object_var (void) CORBA::release (this->ptr_); } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::ptr (void) const { return this->ptr_; } ACE_INLINE -CORBA_Object_var::CORBA_Object_var (const CORBA_Object_var &p) // copy constructor - : ptr_ (CORBA_Object::_duplicate (p.ptr ())) -{} +CORBA_Object_var::CORBA_Object_var (const CORBA_Object_var &p) + : ptr_ (CORBA_Object::_duplicate (p.ptr ())) +{ +} ACE_INLINE CORBA_Object_var & -CORBA_Object_var::operator= (CORBA_Object_ptr p) +CORBA_Object_var::operator= (CORBA::Object_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; @@ -154,36 +138,36 @@ CORBA_Object_var::operator= (const CORBA_Object_var &p) } ACE_INLINE -CORBA_Object_var::operator const CORBA_Object_ptr &() const // cast +CORBA_Object_var::operator const CORBA::Object_ptr &() const // cast { return this->ptr_; } ACE_INLINE -CORBA_Object_var::operator CORBA_Object_ptr &() // cast +CORBA_Object_var::operator CORBA::Object_ptr &() // cast { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::in (void) const { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr & +ACE_INLINE CORBA::Object_ptr & CORBA_Object_var::inout (void) { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr & +ACE_INLINE CORBA::Object_ptr & CORBA_Object_var::out (void) { CORBA::release (this->ptr_); @@ -191,34 +175,34 @@ CORBA_Object_var::out (void) return this->ptr_; } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::_retn (void) { // yield ownership of managed obj reference - CORBA_Object_ptr val = this->ptr_; + CORBA::Object_ptr val = this->ptr_; this->ptr_ = CORBA_Object::_nil (); return val; } -ACE_INLINE CORBA_Object_ptr -CORBA_Object_var::tao_duplicate (CORBA_Object_ptr p) +ACE_INLINE CORBA::Object_ptr +CORBA_Object_var::tao_duplicate (CORBA::Object_ptr p) { return CORBA_Object::_duplicate (p); } ACE_INLINE void -CORBA_Object_var::tao_release (CORBA_Object_ptr p) +CORBA_Object_var::tao_release (CORBA::Object_ptr p) { CORBA::release (p); } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::tao_nil (void) { return CORBA_Object::_nil (); } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_var::tao_narrow ( CORBA::Object *p ACE_ENV_ARG_DECL_NOT_USED @@ -240,24 +224,25 @@ CORBA_Object_var::tao_upcast (void *src) // ************************************************************* ACE_INLINE -CORBA_Object_out::CORBA_Object_out (CORBA_Object_ptr &p) - : ptr_ (p) +CORBA_Object_out::CORBA_Object_out (CORBA::Object_ptr &p) + : ptr_ (p) { this->ptr_ = CORBA_Object::_nil (); } ACE_INLINE -CORBA_Object_out::CORBA_Object_out (CORBA_Object_var &p) // constructor from _var - : ptr_ (p.out ()) +CORBA_Object_out::CORBA_Object_out (CORBA_Object_var &p) + : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = CORBA_Object::_nil (); } ACE_INLINE -CORBA_Object_out::CORBA_Object_out (const CORBA_Object_out &p) // copy constructor - : ptr_ (p.ptr_) -{} +CORBA_Object_out::CORBA_Object_out (const CORBA_Object_out &p) + : ptr_ (p.ptr_) +{ +} ACE_INLINE CORBA_Object_out & CORBA_Object_out::operator= (const CORBA_Object_out &p) @@ -274,25 +259,25 @@ CORBA_Object_out::operator= (const CORBA_Object_var &p) } ACE_INLINE CORBA_Object_out & -CORBA_Object_out::operator= (CORBA_Object_ptr p) +CORBA_Object_out::operator= (CORBA::Object_ptr p) { this->ptr_ = p; return *this; } ACE_INLINE -CORBA_Object_out::operator CORBA_Object_ptr &() // cast +CORBA_Object_out::operator CORBA::Object_ptr &() // cast { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr & +ACE_INLINE CORBA::Object_ptr & CORBA_Object_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE CORBA_Object_ptr +ACE_INLINE CORBA::Object_ptr CORBA_Object_out::operator-> (void) { return this->ptr_; |