OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::DataReaderRemoteImpl Class Reference

Implements the OpenDDS::DCPS::ReaderRemote interface that is used to add and remove associations. More...

#include <DataReaderRemoteImpl.h>

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

Public Member Functions

 DataReaderRemoteImpl (DataReaderCallbacks &parent)
 
virtual ~DataReaderRemoteImpl ()
 
virtual void add_association (const GUID_t &yourId, const WriterAssociation &writer, bool active)
 
virtual void remove_associations (const WriterIdSeq &writers, CORBA::Boolean callback)
 
virtual void update_incompatible_qos (const IncompatibleQosStatus &status)
 
void detach_parent ()
 

Private Attributes

WeakRcHandle< DataReaderCallbacksparent_
 

Detailed Description

Implements the OpenDDS::DCPS::ReaderRemote interface that is used to add and remove associations.

Definition at line 34 of file DataReaderRemoteImpl.h.

Constructor & Destructor Documentation

◆ DataReaderRemoteImpl()

OpenDDS::DCPS::DataReaderRemoteImpl::DataReaderRemoteImpl ( DataReaderCallbacks parent)
explicit

Definition at line 19 of file DataReaderRemoteImpl.cpp.

20  : parent_(parent)
21 {
22 }
WeakRcHandle< DataReaderCallbacks > parent_

◆ ~DataReaderRemoteImpl()

OpenDDS::DCPS::DataReaderRemoteImpl::~DataReaderRemoteImpl ( )
virtual

Definition at line 26 of file DataReaderRemoteImpl.cpp.

27 {
28 }

Member Function Documentation

◆ add_association()

void OpenDDS::DCPS::DataReaderRemoteImpl::add_association ( const GUID_t yourId,
const WriterAssociation writer,
bool  active 
)
virtual

Definition at line 36 of file DataReaderRemoteImpl.cpp.

References ACE_DEBUG, ACE_TEXT(), OpenDDS::DCPS::LogGuid::c_str(), OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, OpenDDS::DCPS::WeakRcHandle< T >::lock(), parent_, and OpenDDS::DCPS::WriterAssociation::writerId.

39 {
40  if (DCPS_debug_level) {
41  LogGuid writer_log(yourId);
42  LogGuid reader_log(writer.writerId);
43  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) DataReaderRemoteImpl::add_association - ")
44  ACE_TEXT("local %C remote %C\n"),
45  writer_log.c_str(),
46  reader_log.c_str()));
47  }
48 
49  // the local copy of parent_ is necessary to prevent race condition
50  RcHandle<DataReaderCallbacks> parent = parent_.lock();
51  if (parent) {
52  parent->add_association(yourId, writer, active);
53  }
54 }
#define ACE_DEBUG(X)
WeakRcHandle< DataReaderCallbacks > parent_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
RcHandle< T > lock() const
Definition: RcObject.h:188

◆ detach_parent()

void OpenDDS::DCPS::DataReaderRemoteImpl::detach_parent ( )

Definition at line 31 of file DataReaderRemoteImpl.cpp.

Referenced by OpenDDS::DCPS::InfoRepoDiscovery::removeDataReaderRemote().

32 {
33 }

◆ remove_associations()

void OpenDDS::DCPS::DataReaderRemoteImpl::remove_associations ( const WriterIdSeq writers,
CORBA::Boolean  callback 
)
virtual

Definition at line 57 of file DataReaderRemoteImpl.cpp.

References OpenDDS::DCPS::WeakRcHandle< T >::lock(), and parent_.

59 {
60  // the local copy of parent_ is necessary to prevent race condition
61  RcHandle<DataReaderCallbacks> parent = parent_.lock();
62  if (parent) {
63  parent->remove_associations(writers, notify_lost);
64  }
65 }
WeakRcHandle< DataReaderCallbacks > parent_
RcHandle< T > lock() const
Definition: RcObject.h:188

◆ update_incompatible_qos()

void OpenDDS::DCPS::DataReaderRemoteImpl::update_incompatible_qos ( const IncompatibleQosStatus status)
virtual

Definition at line 68 of file DataReaderRemoteImpl.cpp.

References OpenDDS::DCPS::WeakRcHandle< T >::lock(), OPENDDS_END_VERSIONED_NAMESPACE_DECL, and parent_.

70 {
71  // the local copy of parent_ is necessary to prevent race condition
72  RcHandle<DataReaderCallbacks> parent = parent_.lock();
73  if (parent) {
74  parent->update_incompatible_qos(status);
75  }
76 }
WeakRcHandle< DataReaderCallbacks > parent_
RcHandle< T > lock() const
Definition: RcObject.h:188

Member Data Documentation

◆ parent_

WeakRcHandle<DataReaderCallbacks> OpenDDS::DCPS::DataReaderRemoteImpl::parent_
private

The documentation for this class was generated from the following files: