RTI Connext Modern C++ API  Version 6.1.0
dds::topic::TopicDescription< T > Class Template Reference

Abstract base class of Topic and ContentFilteredTopic. More...

#include <dds/topic/TopicDescription.hpp>

Inheritance diagram for dds::topic::TopicDescription< T >:
dds::core::Entity dds::topic::ContentFilteredTopic< T > dds::topic::Topic< T >

Public Member Functions

const std::string & name () const
 Gets the topic name. More...
 
const std::string & type_name () const
 Gets the type name. More...
 
const dds::domain::DomainParticipantparticipant () const
 Gets the related dds::domain::DomainParticipant. More...
 
- Public Member Functions inherited from dds::core::Entity
void enable ()
 Enables this entity (if it was created disabled) More...
 
const dds::core::status::StatusMask status_changes ()
 Retrieves the list of communication statuses that are triggered. More...
 
const dds::core::InstanceHandle instance_handle () const
 Get the instance handle that represents this entity. More...
 
void close ()
 Forces the destruction of this entity. More...
 
void retain ()
 Disables the automatic destruction of this entity. More...
 

Additional Inherited Members

Detailed Description

template<typename T>
class dds::topic::TopicDescription< T >

Abstract base class of Topic and ContentFilteredTopic.

TopicDescription represents the fact that both publications and subscriptions are tied to a single data-type. Its attribute type_name defines a unique resulting type for the publication or the subscription and therefore creates an implicit association with a TypeSupport.

TopicDescription has also a name that allows it to be retrieved locally.

See also
TypeSupport, FooTypeSupport
Template Parameters
TThe topic-type

Member Function Documentation

◆ name()

template<typename T>
const std::string& dds::topic::TopicDescription< T >::name ( ) const
inline

Gets the topic name.

Referenced by dds::sub::find(), and rti::sub::find_datareader_by_topic_description().

◆ type_name()

template<typename T>
const std::string& dds::topic::TopicDescription< T >::type_name ( ) const
inline

Gets the type name.

The type name defines a locally unique type for the publication or the subscription.

The association between the topic and the type name is automatic through the template parameter T, via the trait dds::topic::topic_type_name<T>::name(), that is given

When T is rti::core::xtypes::DynamicData, the type name is obtained by default from the rti::core::xtypes::DynamicType.

◆ participant()

template<typename T>
const dds::domain::DomainParticipant& dds::topic::TopicDescription< T >::participant ( ) const
inline

Gets the related dds::domain::DomainParticipant.