RTI Connext Modern C++ API  Version 5.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::topic::AnyTopic Class Reference

<<reference-type>> This class provides an non-template holder for representing a Topic of any type More...

#include "dds/pub/AnyDataWriter.hpp"

Public Member Functions

template<typename T >
 AnyTopic (const dds::topic::Topic< T > &topic)
 Create an AnyTopic that represents a generic, untyped Topic.
 
dds::domain::DomainParticipant domain_participant () const
 Gets the DomainParticipant this topic belongs to.
 
dds::core::status::InconsistentTopicStatus inconsistent_topic_status ()
 Gets the InconsistentTopicStatus of this topic.
 
dds::topic::qos::TopicQos qos () const
 Get the TopicQos.
 
void qos (const dds::topic::qos::TopicQos &the_qos)
 Sets the TopicQos.
 
std::string name () const
 Gets the topic name.
 
std::string type_name () const
 Gets the type name.
 
void close ()
 Closes the Topic.
 
template<typename T >
Topic< T > get ()
 Gets the typed Topic from this AnyTopic.
 

Related Functions

(Note that these are not member functions.)

template<typename T >
Topic< T > get (const AnyTopic &any_topic)
 Same as AnyTopic::get()
 

Detailed Description

<<reference-type>> This class provides an non-template holder for representing a Topic of any type

This class is useful for code that uses Topics of different types. It provides access to type-independent Topic functions.

An AnyTopic is always created from a typed Topic, increasing its reference count. The member function get() allows getting the typed Topic back.

Constructor & Destructor Documentation

template<typename T >
dds::topic::AnyTopic::AnyTopic ( const dds::topic::Topic< T > &  topic)
inline

Create an AnyTopic that represents a generic, untyped Topic.

Template Parameters
TThe type of the Topic that this AnyTopic is being created from
Parameters
topicThe typed Topic that this AnyTopic will represent

Member Function Documentation

dds::domain::DomainParticipant dds::topic::AnyTopic::domain_participant ( ) const
inline

Gets the DomainParticipant this topic belongs to.

dds::core::status::InconsistentTopicStatus dds::topic::AnyTopic::inconsistent_topic_status ( )
inline

Gets the InconsistentTopicStatus of this topic.

dds::topic::qos::TopicQos dds::topic::AnyTopic::qos ( ) const
inline

Get the TopicQos.

void dds::topic::AnyTopic::qos ( const dds::topic::qos::TopicQos the_qos)
inline

Sets the TopicQos.

std::string dds::topic::AnyTopic::name ( ) const
inline

Gets the topic name.

std::string dds::topic::AnyTopic::type_name ( ) const
inline

Gets the type name.

void dds::topic::AnyTopic::close ( )
inline

Closes the Topic.

See Also
Topic::close()
template<typename T >
Topic<T> dds::topic::AnyTopic::get ( )
inline

Gets the typed Topic from this AnyTopic.

Template Parameters
TThe type of the Topic to extract
Returns
The typed Topic that this AnyTopic represents
Exceptions
dds::core::InvalidDowncastErrorIf this AnyTopic doesn't represent a Topic<T>.

Friends And Related Function Documentation

template<typename T >
Topic< T > get ( const AnyTopic any_topic)
related

Same as AnyTopic::get()


RTI Connext Modern C++ API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc