Fast DDS  Version 3.0.0
Fast DDS
Loading...
Searching...
No Matches
TopicDescription.hpp
1// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19#ifndef FASTDDS_DDS_TOPIC__TOPICDESCRIPTION_HPP
20#define FASTDDS_DDS_TOPIC__TOPICDESCRIPTION_HPP
21
22#include <string>
23
24namespace eprosima {
25namespace fastdds {
26namespace dds {
27
28class DomainParticipant;
29class TopicDescriptionImpl;
30
38{
39public:
40
46 virtual DomainParticipant* get_participant() const = 0;
47
53 const std::string& get_name() const
54 {
55 return name_;
56 }
57
63 const std::string& get_type_name() const
64 {
65 return type_name_;
66 }
67
68 virtual TopicDescriptionImpl* get_impl() const = 0;
69
70protected:
71
73 const std::string& name,
74 const std::string& type_name)
75 : name_(name)
76 , type_name_(type_name)
77 {
78 }
79
81 {
82 }
83
84protected:
85
87 std::string name_;
88
90 std::string type_name_;
91};
92
93} // namespace dds
94} // namespace fastdds
95} // namespace eprosima
96
97#endif // FASTDDS_DDS_TOPIC__TOPICDESCRIPTION_HPP
Class DomainParticipant used to group Publishers and Subscribers into a single working unit.
Definition DomainParticipant.hpp:78
Class TopicDescription, represents the fact that both publications and subscriptions are tied to a si...
Definition TopicDescription.hpp:38
std::string type_name_
Name that defines a unique resulting type for the publication or the subscription.
Definition TopicDescription.hpp:90
virtual ~TopicDescription()
Definition TopicDescription.hpp:80
const std::string & get_name() const
Get the name used to create this TopicDescription.
Definition TopicDescription.hpp:53
TopicDescription(const std::string &name, const std::string &type_name)
Definition TopicDescription.hpp:72
std::string name_
Name that allows the TopicDescription to be retrieved locally.
Definition TopicDescription.hpp:87
const std::string & get_type_name() const
Get the associated type name.
Definition TopicDescription.hpp:63
virtual TopicDescriptionImpl * get_impl() const =0
virtual DomainParticipant * get_participant() const =0
Get the DomainParticipant to which the TopicDescription belongs.
Definition DomainParticipant.hpp:45
eProsima namespace.