00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ 00009 #include "TopicDescriptionImpl.h" 00010 #include "DomainParticipantImpl.h" 00011 #include "TopicImpl.h" 00012 #include "Service_Participant.h" 00013 00014 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 namespace OpenDDS { 00017 namespace DCPS { 00018 00019 TopicDescriptionImpl::TopicDescriptionImpl(const char* topic_name, 00020 const char* type_name, 00021 TypeSupport_ptr type_support, 00022 DomainParticipantImpl* participant) 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 } 00030 00031 TopicDescriptionImpl::~TopicDescriptionImpl() 00032 { 00033 } 00034 00035 char * 00036 TopicDescriptionImpl::get_type_name() 00037 { 00038 return CORBA::string_dup(type_name_.c_str()); 00039 } 00040 00041 char * 00042 TopicDescriptionImpl::get_name() 00043 { 00044 return CORBA::string_dup(topic_name_.c_str()); 00045 } 00046 00047 DDS::DomainParticipant_ptr 00048 TopicDescriptionImpl::get_participant() 00049 { 00050 return DDS::DomainParticipant::_duplicate(participant_); 00051 } 00052 00053 OpenDDS::DCPS::TypeSupport_ptr 00054 TopicDescriptionImpl::get_type_support() 00055 { 00056 return type_support_; 00057 } 00058 00059 } // namespace DCPS 00060 } // namespace OpenDDS 00061 00062 OPENDDS_END_VERSIONED_NAMESPACE_DECL