OpenDDS::DCPS::TopicMonitorImpl Class Reference

#include <TopicMonitorImpl.h>

Inheritance diagram for OpenDDS::DCPS::TopicMonitorImpl:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TopicMonitorImpl (TopicImpl *topic, OpenDDS::DCPS::TopicReportDataWriter_ptr topic_writer)
virtual ~TopicMonitorImpl ()
virtual void report ()

Private Attributes

TopicImpltopic_
OpenDDS::DCPS::TopicReportDataWriter_var topic_writer_

Detailed Description

Definition at line 22 of file TopicMonitorImpl.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::TopicMonitorImpl::TopicMonitorImpl ( TopicImpl topic,
OpenDDS::DCPS::TopicReportDataWriter_ptr  topic_writer 
)

Definition at line 19 of file TopicMonitorImpl.cpp.

00021   : topic_(topic),
00022     topic_writer_(TopicReportDataWriter::_duplicate(topic_writer))
00023 {
00024 }

OpenDDS::DCPS::TopicMonitorImpl::~TopicMonitorImpl (  )  [virtual]

Definition at line 26 of file TopicMonitorImpl.cpp.

00027 {
00028 }


Member Function Documentation

void OpenDDS::DCPS::TopicMonitorImpl::report (  )  [virtual]

Implements OpenDDS::DCPS::Monitor.

Definition at line 31 of file TopicMonitorImpl.cpp.

References OpenDDS::DCPS::TopicImpl::get_id(), OpenDDS::DCPS::DomainParticipantImpl::get_id(), OpenDDS::DCPS::TopicDescriptionImpl::get_name(), OpenDDS::DCPS::TopicDescriptionImpl::get_participant(), OpenDDS::DCPS::TopicDescriptionImpl::get_type_name(), DDS::HANDLE_NIL, topic_, and topic_writer_.

00031                          {
00032   if (!CORBA::is_nil(this->topic_writer_.in())) {
00033     TopicReport report;
00034     DDS::DomainParticipant_var dp = this->topic_->get_participant();
00035     DomainParticipantImpl* dp_impl =
00036       dynamic_cast<DomainParticipantImpl*>(dp.in());
00037     report.dp_id      = dp_impl->get_id();
00038     report.topic_id   = this->topic_->get_id();
00039     report.topic_name = this->topic_->get_name();
00040     report.type_name  = this->topic_->get_type_name();
00041     this->topic_writer_->write(report, DDS::HANDLE_NIL);
00042   }
00043 }


Member Data Documentation

TopicImpl* OpenDDS::DCPS::TopicMonitorImpl::topic_ [private]

Definition at line 30 of file TopicMonitorImpl.h.

Referenced by report().

OpenDDS::DCPS::TopicReportDataWriter_var OpenDDS::DCPS::TopicMonitorImpl::topic_writer_ [private]

Definition at line 31 of file TopicMonitorImpl.h.

Referenced by report().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:44 2016 for OpenDDS by  doxygen 1.4.7