Class Topic

Inheritance Relationships

Base Type

Class Documentation

class Topic : public dds::core::TEntity<detail::Topic>

Public Functions

OMG_DDS_REF_TYPE_PROTECTED_DC(Topic, dds::core::TEntity, detail::Topic) OMG_DDS_IMPLICIT_REF_BASE(Topic) OMG_DDS_API Topic(const dds OMG_DDS_API Topic (const dds::domain::DomainParticipant &dp, const std::string &topic_name, const std::string &type_name, const qos::TopicQos &qos, TopicListener *listener=nullptr, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::none())

Create a new Topic.

The Topic will be created with the QoS values specified on the last successful call to dp.default_topic_qos(qos) or, if the call was never made, the default values.

The Topic will be created with the given QosPolicy settings and if applicable, attaches the optionally specified TopicListener to it.

See listener for more information about listeners and possible status propagation to other entities.

Parameters:
  • dp – the domain participant

  • dp – the domain participant to create the Topic with.

  • qos – a collection of QosPolicy settings for the new Topic. In case these settings are not self consistent, no Topic is created.

  • listener – the Topic listener

  • mask – the mask of events notified to the listener

Throws:
  • dds::core::Error – An internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation. Create a new Topic.

  • dds::core::Error – An internal error has occurred.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

  • dds::core::InconsistentPolicyError – The parameter qos contains conflicting QosPolicy settings.