OpenDDS::DCPS::RcObject Class Reference

#include <RcObject.h>

Inheritance diagram for OpenDDS::DCPS::RcObject:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::RcObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~RcObject ()
virtual void _add_ref ()
virtual void _remove_ref ()
long ref_count () const
 This accessor is purely for debugging purposes.
WeakObject_get_weak_object () const

Protected Member Functions

 RcObject ()

Private Member Functions

 RcObject (const RcObject &)
RcObjectoperator= (const RcObject &)

Private Attributes

ACE_Atomic_Op< ACE_SYNCH_MUTEX,
long > 
ref_count_
WeakObjectweak_object_

Detailed Description

Definition at line 53 of file RcObject.h.


Constructor & Destructor Documentation

virtual OpenDDS::DCPS::RcObject::~RcObject (  )  [inline, virtual]

Definition at line 56 of file RcObject.h.

References OpenDDS::DCPS::WeakObject::_remove_ref(), and weak_object_.

00056                        {
00057       weak_object_->_remove_ref();
00058     }

Here is the call graph for this function:

OpenDDS::DCPS::RcObject::RcObject (  )  [inline, protected]

Definition at line 84 of file RcObject.h.

00085       : ref_count_(1)
00086       , weak_object_( new WeakObject(this) )
00087     {}

OpenDDS::DCPS::RcObject::RcObject ( const RcObject  )  [private]

Member Function Documentation

virtual void OpenDDS::DCPS::RcObject::_add_ref ( void   )  [inline, virtual]
WeakObject* OpenDDS::DCPS::RcObject::_get_weak_object (  )  const [inline]

Definition at line 77 of file RcObject.h.

References OpenDDS::DCPS::WeakObject::_add_ref(), and weak_object_.

00077                              {
00078       weak_object_->_add_ref();
00079       return weak_object_;
00080     }

Here is the call graph for this function:

virtual void OpenDDS::DCPS::RcObject::_remove_ref ( void   )  [inline, virtual]

Reimplemented in OpenDDS::DCPS::LocalObjectBase, and OpenDDS::DCPS::SendResponseListener.

Definition at line 64 of file RcObject.h.

References ref_count_, OpenDDS::DCPS::WeakObject::set_expire(), and weak_object_.

Referenced by OpenDDS::DCPS::TransportReactorTask::close(), TAO::Objref_Traits< OpenDDS::DCPS::Replayer >::release(), OpenDDS::DCPS::TopicDescriptionImpl::remove_entity_ref(), OpenDDS::DCPS::TcpConnection::remove_reference(), OpenDDS::DCPS::RcEventHandler::remove_reference(), and OpenDDS::DCPS::TcpConnection::spawn_reconnect_thread().

00064                                {
00065       const long new_count = --this->ref_count_;
00066       if (new_count == 0 && weak_object_->set_expire()) {
00067         delete this;
00068       }
00069     }

Here is the call graph for this function:

Here is the caller graph for this function:

RcObject& OpenDDS::DCPS::RcObject::operator= ( const RcObject  )  [private]
long OpenDDS::DCPS::RcObject::ref_count (  )  const [inline]

This accessor is purely for debugging purposes.

Definition at line 72 of file RcObject.h.

References ref_count_, and ACE_Atomic_Op< ACE_LOCK, TYPE >::value().

Referenced by OpenDDS::DCPS::WeakObject::set_expire().

00072                            {
00073       return this->ref_count_.value();
00074     }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ACE_Atomic_Op<ACE_SYNCH_MUTEX, long> OpenDDS::DCPS::RcObject::ref_count_ [private]

Definition at line 92 of file RcObject.h.

Referenced by _add_ref(), _remove_ref(), and ref_count().

Definition at line 93 of file RcObject.h.

Referenced by _get_weak_object(), _remove_ref(), and ~RcObject().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1