OpenDDS::DCPS::WeakRcHandle< T > Class Template Reference

#include <RcObject.h>

Collaboration diagram for OpenDDS::DCPS::WeakRcHandle< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WeakRcHandle ()
 WeakRcHandle (const T &obj)
 WeakRcHandle (const RcHandle< T > &rch)
 WeakRcHandle (const WeakRcHandle &other)
 ~WeakRcHandle ()
WeakRcHandleoperator= (const WeakRcHandle &other)
WeakRcHandleoperator= (const RcHandle< T > &other)
WeakRcHandleoperator= (const T &obj)
RcHandle< T > lock () const
bool operator== (const WeakRcHandle &rhs) const
bool operator!= (const WeakRcHandle &rhs) const
bool operator< (const WeakRcHandle &rhs) const
 operator bool () const
void reset ()

Private Member Functions

 WeakRcHandle (WeakObject *obj)

Private Attributes

WeakObjectweak_object_

Detailed Description

template<typename T>
class OpenDDS::DCPS::WeakRcHandle< T >

Definition at line 122 of file RcObject.h.


Constructor & Destructor Documentation

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::WeakRcHandle (  )  [inline]

Definition at line 125 of file RcObject.h.

00126       : weak_object_(0)
00127     {
00128     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::WeakRcHandle ( const T &  obj  )  [inline]

Definition at line 130 of file RcObject.h.

00131       : weak_object_(obj._get_weak_object()) {
00132     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::WeakRcHandle ( const RcHandle< T > &  rch  )  [inline]

Definition at line 134 of file RcObject.h.

00135       : weak_object_(rch.in() ? rch.in()->_get_weak_object() : 0) {
00136     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::WeakRcHandle ( const WeakRcHandle< T > &  other  )  [inline]

Definition at line 138 of file RcObject.h.

00139     : weak_object_(other.weak_object_){
00140       if (weak_object_)
00141         weak_object_->_add_ref();
00142     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::~WeakRcHandle (  )  [inline]

Definition at line 144 of file RcObject.h.

00144                    {
00145       if (weak_object_)
00146         weak_object_->_remove_ref();
00147     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::WeakRcHandle ( WeakObject obj  )  [inline, private]

Definition at line 202 of file RcObject.h.

00203       : weak_object_(obj)
00204     {
00205     }


Member Function Documentation

template<typename T>
RcHandle<T> OpenDDS::DCPS::WeakRcHandle< T >::lock ( void   )  const [inline]

Definition at line 167 of file RcObject.h.

Referenced by OpenDDS::DCPS::DataWriterRemoteImpl::add_association(), OpenDDS::DCPS::DataReaderRemoteImpl::add_association(), OpenDDS::DCPS::DataWriterImpl::assert_liveliness(), OpenDDS::DCPS::DataWriterRemoteImpl::association_complete(), OpenDDS::DCPS::DataReaderRemoteImpl::association_complete(), OpenDDS::DCPS::DataWriterImpl::association_complete_i(), OpenDDS::DCPS::DataReaderImpl::LivelinessTimer::check_liveliness_i(), OpenDDS::DCPS::DataWriterImpl::create_control_message(), OpenDDS::DCPS::SubscriberImpl::create_datareader(), OpenDDS::DCPS::DataWriterImpl::create_sample_data_message(), OpenDDS::DCPS::ReceiveListenerSet::data_received(), OpenDDS::DCPS::DataLink::data_received_i(), OpenDDS::DCPS::PublisherImpl::delete_datawriter(), OpenDDS::DCPS::SubscriberImpl::enable(), OpenDDS::DCPS::PublisherImpl::enable(), OpenDDS::DCPS::DataWriterImpl::enable(), OpenDDS::DCPS::DataReaderImpl::enable(), OpenDDS::DCPS::DataWriterImpl::end_coherent_changes(), OpenDDS::DCPS::RequestedDeadlineWatchdog::execute(), OpenDDS::DCPS::TcpDataLink::get_connection(), OpenDDS::DCPS::DataWriterImpl::get_instance_handle(), OpenDDS::DCPS::DataReaderImpl::get_instance_handle(), OpenDDS::DCPS::DataReaderImpl::get_matched_publication_data(), OpenDDS::DCPS::DataWriterImpl::get_matched_subscription_data(), OpenDDS::DCPS::DataWriterImpl::get_next_handle(), OpenDDS::DCPS::DataReaderImpl::get_next_handle(), OpenDDS::DCPS::SubscriberImpl::get_participant(), OpenDDS::DCPS::PublisherImpl::get_participant(), OpenDDS::DCPS::DataWriterImpl::get_publisher(), OpenDDS::DCPS::DataReaderImpl::get_subscriber_servant(), OpenDDS::DCPS::RequestedDeadlineWatchdog::handle_timeout(), OpenDDS::DCPS::OfferedDeadlineWatchdog::handle_timeout(), OpenDDS::DCPS::LivenessTimer::handle_timeout(), OpenDDS::DCPS::EndHistoricSamplesMissedSweeper::handle_timeout(), OpenDDS::DCPS::DataWriterImpl::init(), OpenDDS::DCPS::DataWriterImpl::listener_for(), OpenDDS::DCPS::DataWriterImpl::lookup_instance_handles(), OpenDDS::DCPS::DataReaderImpl::lookup_instance_handles(), OpenDDS::DCPS::SubscriberImpl::parent(), OpenDDS::DCPS::PublisherImpl::parent(), OpenDDS::DCPS::DataWriterImpl::parent(), OpenDDS::DCPS::DataReaderImpl::parent(), OpenDDS::DCPS::UdpTransport::passive_connection(), OpenDDS::DCPS::MulticastTransport::passive_connection(), OpenDDS::DCPS::TcpDataLink::pre_stop_i(), OpenDDS::DCPS::ReactorSynch::ReactorSynch(), OpenDDS::DCPS::TcpDataLink::reconnect(), OpenDDS::DCPS::DataWriterRemoteImpl::remove_associations(), OpenDDS::DCPS::DataReaderRemoteImpl::remove_associations(), OpenDDS::DCPS::RequestedDeadlineWatchdog::reschedule_deadline(), OpenDDS::DCPS::OfferedDeadlineWatchdog::reschedule_deadline(), OpenDDS::DCPS::DataWriterImpl::retrieve_inline_qos_data(), OpenDDS::DCPS::TcpDataLink::reuse_existing_connection(), OpenDDS::DCPS::InstanceState::sample_info(), OpenDDS::DCPS::PublisherImpl::set_qos(), OpenDDS::DCPS::DataWriterImpl::set_qos(), OpenDDS::DCPS::TcpDataLink::stop_i(), OpenDDS::DCPS::PerConnectionSynch::svc(), OpenDDS::DCPS::DataReaderImpl::transport_assoc_done(), OpenDDS::DCPS::DataWriterRemoteImpl::update_incompatible_qos(), OpenDDS::DCPS::DataReaderRemoteImpl::update_incompatible_qos(), OpenDDS::DCPS::DataWriterRemoteImpl::update_subscription_params(), OpenDDS::DCPS::DataWriterImpl::write(), OpenDDS::DCPS::ReactorSynch::~ReactorSynch(), and OpenDDS::DCPS::DataWriterImpl::ReaderInfo::~ReaderInfo().

00167                              {
00168       if (weak_object_){
00169         return RcHandle<T>(dynamic_cast<T*>(weak_object_->lock()), keep_count());
00170       }
00171       return RcHandle<T>();
00172     }

template<typename T>
OpenDDS::DCPS::WeakRcHandle< T >::operator bool ( void   )  const [inline]

Definition at line 189 of file RcObject.h.

00189                           {
00190       return weak_object_;
00191     }

template<typename T>
bool OpenDDS::DCPS::WeakRcHandle< T >::operator!= ( const WeakRcHandle< T > &  rhs  )  const [inline]

Definition at line 179 of file RcObject.h.

00180     {
00181       return weak_object_ != rhs.weak_object_;
00182     }

template<typename T>
bool OpenDDS::DCPS::WeakRcHandle< T >::operator< ( const WeakRcHandle< T > &  rhs  )  const [inline]

Definition at line 184 of file RcObject.h.

00185     {
00186       return weak_object_ < rhs.weak_object_;
00187     }

template<typename T>
WeakRcHandle& OpenDDS::DCPS::WeakRcHandle< T >::operator= ( const T &  obj  )  [inline]

Definition at line 161 of file RcObject.h.

00161                                             {
00162       WeakRcHandle tmp(obj);
00163       std::swap(weak_object_, tmp.weak_object_);
00164       return *this;
00165     }

template<typename T>
WeakRcHandle& OpenDDS::DCPS::WeakRcHandle< T >::operator= ( const RcHandle< T > &  other  )  [inline]

Definition at line 155 of file RcObject.h.

00155                                                         {
00156        WeakRcHandle tmp(other);
00157        std::swap(weak_object_, tmp.weak_object_);
00158        return *this;
00159     }

template<typename T>
WeakRcHandle& OpenDDS::DCPS::WeakRcHandle< T >::operator= ( const WeakRcHandle< T > &  other  )  [inline]

Definition at line 149 of file RcObject.h.

00149                                                          {
00150        WeakRcHandle tmp(other);
00151        std::swap(weak_object_, tmp.weak_object_);
00152        return *this;
00153     }

template<typename T>
bool OpenDDS::DCPS::WeakRcHandle< T >::operator== ( const WeakRcHandle< T > &  rhs  )  const [inline]

Definition at line 174 of file RcObject.h.

00175     {
00176       return weak_object_ == rhs.weak_object_;
00177     }

template<typename T>
void OpenDDS::DCPS::WeakRcHandle< T >::reset ( void   )  [inline]

Definition at line 193 of file RcObject.h.

Referenced by OpenDDS::DCPS::TcpDataLink::connect().

00193                  {
00194       if (weak_object_) {
00195         weak_object_->_remove_ref();
00196         weak_object_ = 0;
00197       }
00198     }

Here is the caller graph for this function:


Member Data Documentation

template<typename T>
WeakObject* OpenDDS::DCPS::WeakRcHandle< T >::weak_object_ [private]

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