Implements the DDS::TopicDescription interface. More...
#include <TopicDescriptionImpl.h>
Public Member Functions | |
TopicDescriptionImpl (const char *topic_name, const char *type_name, TypeSupport_ptr type_support, DomainParticipantImpl *participant) | |
virtual | ~TopicDescriptionImpl () |
virtual char * | get_type_name () |
virtual char * | get_name () |
virtual DDS::DomainParticipant_ptr | get_participant () |
OpenDDS::DCPS::TypeSupport_ptr | get_type_support () |
bool | has_entity_refs () const |
void | add_entity_ref () |
void | remove_entity_ref () |
Protected Attributes | |
ACE_CString | topic_name_ |
The name of the topic. | |
ACE_CString | type_name_ |
The datatype of the topic. | |
DomainParticipantImpl * | participant_ |
The participant that creates this topic. | |
OpenDDS::DCPS::TypeSupport_var | type_support_ |
The type_support for this topic. | |
ACE_Atomic_Op < ACE_Thread_Mutex, unsigned long > | entity_refs_ |
The number of entities using this topic. |
Implements the DDS::TopicDescription interface.
See the DDS specification, OMG formal/04-12-02, for a description of the interface this class is implementing.
Definition at line 38 of file TopicDescriptionImpl.h.
OpenDDS::DCPS::TopicDescriptionImpl::TopicDescriptionImpl | ( | const char * | topic_name, | |
const char * | type_name, | |||
TypeSupport_ptr | type_support, | |||
DomainParticipantImpl * | participant | |||
) |
Definition at line 19 of file TopicDescriptionImpl.cpp.
References _duplicate().
00023 : topic_name_(topic_name), 00024 type_name_(type_name), 00025 participant_(participant), 00026 type_support_(OpenDDS::DCPS::TypeSupport::_duplicate(type_support)), 00027 entity_refs_(0) 00028 { 00029 }
OpenDDS::DCPS::TopicDescriptionImpl::~TopicDescriptionImpl | ( | ) | [virtual] |
Definition at line 31 of file TopicDescriptionImpl.cpp.
void OpenDDS::DCPS::TopicDescriptionImpl::add_entity_ref | ( | ) | [inline] |
Definition at line 64 of file TopicDescriptionImpl.h.
References OpenDDS::DCPS::RcObject::_add_ref().
00064 { 00065 RcObject::_add_ref(); 00066 ++entity_refs_; 00067 }
char * OpenDDS::DCPS::TopicDescriptionImpl::get_name | ( | void | ) | [virtual] |
Implements DDS::TopicDescription.
Definition at line 42 of file TopicDescriptionImpl.cpp.
References ACE_String_Base< ACE_CHAR_T >::c_str(), FACE::string_dup(), and topic_name_.
Referenced by OpenDDS::DCPS::PublisherImpl::create_datawriter(), OpenDDS::DCPS::DomainParticipantImpl::delete_topic_i(), OpenDDS::DCPS::RecorderImpl::init(), OpenDDS::DCPS::DataReaderImpl::init(), and OpenDDS::DCPS::TopicMonitorImpl::report().
00043 { 00044 return CORBA::string_dup(topic_name_.c_str()); 00045 }
DDS::DomainParticipant_ptr OpenDDS::DCPS::TopicDescriptionImpl::get_participant | ( | ) | [virtual] |
Implements DDS::TopicDescription.
Definition at line 48 of file TopicDescriptionImpl.cpp.
References CORBA::LocalObject::_duplicate(), and participant_.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::delete_topic_i(), and OpenDDS::DCPS::TopicMonitorImpl::report().
00049 { 00050 return DDS::DomainParticipant::_duplicate(participant_); 00051 }
char * OpenDDS::DCPS::TopicDescriptionImpl::get_type_name | ( | ) | [virtual] |
Implements DDS::TopicDescription.
Definition at line 36 of file TopicDescriptionImpl.cpp.
References ACE_String_Base< ACE_CHAR_T >::c_str(), FACE::string_dup(), and type_name_.
Referenced by OpenDDS::DCPS::RecorderImpl::init(), and OpenDDS::DCPS::TopicMonitorImpl::report().
00037 { 00038 return CORBA::string_dup(type_name_.c_str()); 00039 }
OpenDDS::DCPS::TypeSupport_ptr OpenDDS::DCPS::TopicDescriptionImpl::get_type_support | ( | ) |
This method is not defined in the IDL and is defined for internal use. Return the type support of the topic.
Definition at line 54 of file TopicDescriptionImpl.cpp.
References type_support_.
Referenced by OpenDDS::DCPS::SubscriberImpl::create_datareader(), OpenDDS::DCPS::PublisherImpl::create_datawriter(), OpenDDS::DCPS::MultiTopicDataReaderBase::init(), and OpenDDS::DCPS::MultiTopicDataReaderBase::metaStructFor().
00055 { 00056 return type_support_; 00057 }
bool OpenDDS::DCPS::TopicDescriptionImpl::has_entity_refs | ( | ) | const [inline] |
Definition at line 60 of file TopicDescriptionImpl.h.
Referenced by OpenDDS::DCPS::DomainParticipantImpl::delete_contentfilteredtopic(), OpenDDS::DCPS::DomainParticipantImpl::delete_multitopic(), and OpenDDS::DCPS::DomainParticipantImpl::delete_topic_i().
00060 { 00061 return entity_refs_ > 0; 00062 }
void OpenDDS::DCPS::TopicDescriptionImpl::remove_entity_ref | ( | ) | [inline] |
Definition at line 69 of file TopicDescriptionImpl.h.
References OpenDDS::DCPS::RcObject::_remove_ref().
00069 { 00070 --entity_refs_; 00071 RcObject::_remove_ref(); 00072 }
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> OpenDDS::DCPS::TopicDescriptionImpl::entity_refs_ [protected] |
The number of entities using this topic.
Definition at line 87 of file TopicDescriptionImpl.h.
The participant that creates this topic.
Definition at line 81 of file TopicDescriptionImpl.h.
Referenced by OpenDDS::DCPS::TopicImpl::enable(), OpenDDS::DCPS::TopicImpl::get_instance_handle(), get_participant(), OpenDDS::DCPS::TopicImpl::inconsistent_topic(), and OpenDDS::DCPS::TopicImpl::set_qos().
The name of the topic.
Definition at line 76 of file TopicDescriptionImpl.h.
Referenced by OpenDDS::DCPS::TopicImpl::enable(), and get_name().
The datatype of the topic.
Definition at line 78 of file TopicDescriptionImpl.h.
Referenced by OpenDDS::DCPS::TopicImpl::enable(), get_type_name(), and OpenDDS::DCPS::TopicImpl::type_name().
OpenDDS::DCPS::TypeSupport_var OpenDDS::DCPS::TopicDescriptionImpl::type_support_ [protected] |
The type_support for this topic.
Definition at line 84 of file TopicDescriptionImpl.h.
Referenced by OpenDDS::DCPS::TopicImpl::enable(), and get_type_support().