diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-03-22 06:16:20 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-03-22 06:16:20 +0000 |
commit | 8b86f2bc077239c9c0eb56727203b5cb362689d1 (patch) | |
tree | 013cd1db3d6a3ad7fc6a076ee28eddde0f43544e /TAO/tao/IIOP_Object.i | |
parent | 1c7a26239059d057a872a9d13a7901bda180a328 (diff) | |
download | ATCD-8b86f2bc077239c9c0eb56727203b5cb362689d1.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/IIOP_Object.i')
-rw-r--r-- | TAO/tao/IIOP_Object.i | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/TAO/tao/IIOP_Object.i b/TAO/tao/IIOP_Object.i new file mode 100644 index 00000000000..a8da7e90b62 --- /dev/null +++ b/TAO/tao/IIOP_Object.i @@ -0,0 +1,97 @@ +ACE_INLINE +IIOP::Version::Version (CORBA::Octet maj, CORBA::Octet min) + : major (maj), + minor (min) +{ +} + +ACE_INLINE +IIOP::Profile::Profile (void) + : host (0) +{ +} + +ACE_INLINE +IIOP::Profile::~Profile (void) +{ + delete [] this->host; +} + +ACE_INLINE void +IIOP::Profile::object_addr (const ACE_INET_Addr *addr) +{ + if (addr != 0) + this->object_addr_ = *addr; + else if (this->host) + this->object_addr_.set (this->port, this->host); +} + +ACE_INLINE ACE_INET_Addr & +IIOP::Profile::object_addr (void) +{ + return this->object_addr_; +} + +ACE_INLINE +IIOP_Object::~IIOP_Object (void) +{ + assert (this->refcount_ == 0); + delete this->fwd_profile_; +} + +ACE_INLINE +IIOP_Object::IIOP_Object (char *repository_id) + : STUB_Object (repository_id), + refcount_ (0), + fwd_profile_ (0) +{ +} + +ACE_INLINE +IIOP_Object::IIOP_Object (char *repository_id, + const IIOP::Profile &a_profile) + : STUB_Object (repository_id), + profile (a_profile), + refcount_ (0), + fwd_profile_ (0) +{ +} + +ACE_INLINE +IIOP::Profile * +IIOP_Object::fwd_profile_i (void) +{ + return this->fwd_profile_; +} + +ACE_INLINE +IIOP::Profile * +IIOP_Object::fwd_profile_i (IIOP::Profile *new_profile) +{ + IIOP::Profile *old = this->fwd_profile_; + this->fwd_profile_ = new_profile; + return old; +} + +ACE_INLINE +IIOP::Profile * +IIOP_Object::fwd_profile (void) +{ + ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->fwd_profile_lock_, 0)); + return this->fwd_profile_i (); +} + +ACE_INLINE +IIOP::Profile * +IIOP_Object::fwd_profile (IIOP::Profile *new_profile) +{ + ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->fwd_profile_lock_, 0)); + return this->fwd_profile_i (new_profile); +} + +ACE_INLINE +ACE_SYNCH_MUTEX & +IIOP_Object::fwd_profile_lock (void) +{ + return fwd_profile_lock_; +} |