123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- #ifndef _FASTDDS_TOPIC_HPP_
- #define _FASTDDS_TOPIC_HPP_
- #include <fastrtps/fastrtps_dll.h>
- #include <fastdds/dds/core/Entity.hpp>
- #include <fastdds/dds/core/status/BaseStatus.hpp>
- #include <fastdds/dds/topic/TopicDescription.hpp>
- #include <fastdds/dds/topic/qos/TopicQos.hpp>
- using eprosima::fastrtps::types::ReturnCode_t;
- namespace dds {
- namespace topic {
- class Topic;
- }
- }
- namespace eprosima {
- namespace fastdds {
- namespace dds {
- class DomainParticipant;
- class TopicListener;
- class DomainParticipantImpl;
- class TopicImpl;
- class Topic : public DomainEntity, public TopicDescription
- {
- friend class TopicImpl;
- friend class DomainParticipantImpl;
-
- RTPS_DllAPI Topic(
- const std::string& topic_name,
- const std::string& type_name,
- TopicImpl* p,
- const StatusMask& mask = StatusMask::all());
- RTPS_DllAPI Topic(
- DomainParticipant* dp,
- const std::string& topic_name,
- const std::string& type_name,
- const TopicQos& qos = TOPIC_QOS_DEFAULT,
- TopicListener* listener = nullptr,
- const StatusMask& mask = StatusMask::all());
- public:
-
- RTPS_DllAPI virtual ~Topic();
-
- virtual DomainParticipant* get_participant() const override;
-
- ReturnCode_t get_inconsistent_topic_status(
- InconsistentTopicStatus& status);
-
- RTPS_DllAPI const TopicQos& get_qos() const;
-
- RTPS_DllAPI ReturnCode_t get_qos(
- TopicQos& qos) const;
-
- RTPS_DllAPI ReturnCode_t set_qos(
- const TopicQos& qos);
-
- RTPS_DllAPI const TopicListener* get_listener() const;
-
- RTPS_DllAPI ReturnCode_t set_listener(
- TopicListener* listener,
- const StatusMask& mask = StatusMask::all());
-
- TopicDescriptionImpl* get_impl() const override;
- private:
- TopicImpl* impl_;
- friend class ::dds::topic::Topic;
- };
- }
- }
- }
- #endif
|