CoreDX DDS Modern C++ API
Public Member Functions | List of all members
dds::topic::Topic< T > Class Template Reference

Topic is the most basic description of the data to be published and subscribed. More...

Inheritance diagram for dds::topic::Topic< T >:
Inheritance graph
[legend]
Collaboration diagram for dds::topic::Topic< T >:
Collaboration graph
[legend]

Public Member Functions

 Topic (const dds::domain::DomainParticipant &dp, const std::string &topic_name)
 Create a new topic. More...
 
 Topic (const dds::domain::DomainParticipant &dp, const std::string &topic_name, const std::string &type_name)
 Create a new topic.The QoS will be set to dp.default_topic_qos(). More...
 
 Topic (const dds::domain::DomainParticipant &dp, const std::string &topic_name, const dds::topic::qos::TopicQos &qos, dds::topic::TopicListener< T > *listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::none())
 Create a new topic. More...
 
 Topic (const dds::domain::DomainParticipant &dp, const std::string &topic_name, const std::string &type_name, const dds::topic::qos::TopicQos &qos, dds::topic::TopicListener< T > *listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::none())
 Create a new topic. More...
 
void listener (Listener *the_listener, const dds::core::status::StatusMask &event_mask)
 Set the Topic listener.
 
Listenerlistener () const
 Get the Topic listener.
 
- Public Member Functions inherited from dds::topic::AnyTopic
dds::topic::qos::TopicQos qos () const
 Gets the TopicQos setting for this instance. More...
 
void qos (const dds::topic::qos::TopicQos &qos)
 This operation replaces the existing set of QosPolicy settings for a Topic. More...
 
AnyTopicoperator<< (const dds::topic::qos::TopicQos &qos)
 This operation replaces the existing set of QosPolicy settings for a Topic. More...
 
const AnyTopicoperator>> (dds::topic::qos::TopicQos &qos) const
 Populates the target qos with the qos policies in this instance. More...
 
dds::core::status::InconsistentTopicStatus inconsistent_topic_status () const
 This operation obtains the InconsistentTopicStatus object of the Topic. More...
 
- Public Member Functions inherited from dds::core::Entity
void enable ()
 This operation enables the Entity. More...
 
const dds::core::status::StatusMask status_changes ()
 This operation retrieves the list of communication statuses in the Entity that are triggered.That is, the list of statuses whose value has changed since the last time the application read the status. More...
 
const dds::core::InstanceHandle instance_handle () const
 This operation returns the InstanceHandle_t that represents the Entity.
 
void close ()
 This method closes the entity and releases all resources associated with DDS, such as threads, sockets, buffers, etc. More...
 
void retain ()
 Indicates that references to this object may go out of scope but that the application expects to look it up again later. More...
 
- Public Member Functions inherited from dds::core::Reference< DELEGATE >
 Reference (dds::core::null_type &)
 Creates a "null" reference.
 
 Reference (const Reference &ref)
 Creates a reference from another. More...
 
template<typename D >
 Reference (const Reference< D > &ref)
 Enables safe assignment from other reference types. More...
 
 Reference (DELEGATE_T *p)
 The following two constructors create a dds Reference from a vendor specific delegate. More...
 
 ~Reference ()
 Destroys a reference.
 
template<typename R >
bool operator== (const R &ref) const
 Compares two reference objects and returns true if they are equal. More...
 
template<typename R >
bool operator!= (const R &ref) const
 Compares two reference objects and returns true if they are not-equal. More...
 
Referenceoperator= (const null_type)
 Special assignment operators that takes care of assigning null to this reference. More...
 
bool is_nil () const
 Returns true if this reference object is nil, meaning pointing to null.
 
bool operator== (const null_type) const
 Special operator== used to check if this reference object equals the null reference. More...
 
bool operator!= (const null_type nil) const
 Special operator!= used to check if this reference object does not equals the null reference. More...
 
const DELEGATE_REF_T & delegate () const
 Returns a reference to the underlying delegate. More...
 
DELEGATE_REF_T & delegate ()
 Returns a reference to the underlying delegate. More...
 
DELEGATE * operator-> ()
 The operator->() is provided to be able to directly invoke methods on the delegate. More...
 
const DELEGATE * operator-> () const
 The operator->() is provided to be able to directly invoke methods on the delegate. More...
 
- Public Member Functions inherited from dds::topic::TopicDescription
const std::string & name () const
 This operation returns the name used to create the TopicDescription. More...
 
const std::string & type_name () const
 This operation returns the registered name of the data type associated with the TopicDescription. More...
 
const dds::domain::DomainParticipantdomain_participant () const
 This operation returns the DomainParticipant associated with the TopicDescription. More...
 
const dds::domain::DomainParticipantparticipant () const
 This operation returns the DomainParticipant associated with the TopicDescription. More...
 

Detailed Description

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

Topic is the most basic description of the data to be published and subscribed.

A Topic is identified by its name, which must be unique in the whole Domain. In addition (by virtue of extending TopicDescription) it fully specifies the type of the data that can be communicated when publishing or subscribing to the Topic. Topic is the only TopicDescription that can be used for publications and therefore associated to a DataWriter.

Constructor & Destructor Documentation

◆ Topic() [1/4]

template<typename T>
dds::topic::Topic< T >::Topic ( const dds::domain::DomainParticipant dp,
const std::string &  topic_name 
)

Create a new topic.

Parameters
dpthe domain participant on which the topic will be defined.
topic_namethe topic's name. The QoS will be set to dp.default_topic_qos().

◆ Topic() [2/4]

template<typename T>
dds::topic::Topic< T >::Topic ( const dds::domain::DomainParticipant dp,
const std::string &  topic_name,
const std::string &  type_name 
)

Create a new topic.The QoS will be set to dp.default_topic_qos().

Parameters
dpthe domain participant on which the topic will be defined.
topic_namethe topic's name. c *
type_namethe name associated with the topic type.

◆ Topic() [3/4]

template<typename T>
dds::topic::Topic< T >::Topic ( const dds::domain::DomainParticipant dp,
const std::string &  topic_name,
const dds::topic::qos::TopicQos qos,
dds::topic::TopicListener< T > *  listener = NULL,
const dds::core::status::StatusMask mask = dds::core::status::StatusMask::none() 
)

Create a new topic.

Parameters
dpthe domain participant on which the topic will be defined.
topic_namethe topic's name.
qosthe topic listener.
listenerthe topic listener.
maskthe listener event mask.

◆ Topic() [4/4]

template<typename T>
dds::topic::Topic< T >::Topic ( const dds::domain::DomainParticipant dp,
const std::string &  topic_name,
const std::string &  type_name,
const dds::topic::qos::TopicQos qos,
dds::topic::TopicListener< T > *  listener = NULL,
const dds::core::status::StatusMask mask = dds::core::status::StatusMask::none() 
)

Create a new topic.

Parameters
dpthe domain participant on which the topic will be defined.
topic_namethe topic's name.
type_namethe name associated with the topic type.
qosthe topic listener.
listenerthe topic listener.
maskthe listener event mask.

© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.