/src/Fast-DDS/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp
Line | Count | Source (jump to first uncovered line) |
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 | | |
15 | | /** |
16 | | * @file SubscriberQos.hpp |
17 | | * |
18 | | */ |
19 | | |
20 | | #ifndef _FASTDDS_SUBSCRIBERQOS_HPP_ |
21 | | #define _FASTDDS_SUBSCRIBERQOS_HPP_ |
22 | | |
23 | | #include <fastdds/dds/core/policy/QosPolicies.hpp> |
24 | | #include <fastrtps/attributes/SubscriberAttributes.h> |
25 | | |
26 | | namespace eprosima { |
27 | | namespace fastdds { |
28 | | namespace dds { |
29 | | |
30 | | /** |
31 | | * Class SubscriberQos, contains all the possible Qos that can be set for a determined Subscriber. |
32 | | * Although these values can be set and are transmitted |
33 | | * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library. |
34 | | * Please consult each of them to check for implementation details and default values. |
35 | | * |
36 | | * @ingroup FASTDDS_QOS_MODULE |
37 | | */ |
38 | | class SubscriberQos |
39 | | { |
40 | | public: |
41 | | |
42 | | /** |
43 | | * @brief Constructor |
44 | | */ |
45 | | RTPS_DllAPI SubscriberQos() |
46 | 2 | { |
47 | 2 | } |
48 | | |
49 | | /** |
50 | | * @brief Destructor |
51 | | */ |
52 | | RTPS_DllAPI virtual ~SubscriberQos() |
53 | 0 | { |
54 | 0 | } |
55 | | |
56 | | bool operator ==( |
57 | | const SubscriberQos& b) const |
58 | 0 | { |
59 | 0 | return (presentation_ == b.presentation_) && |
60 | 0 | (partition_ == b.partition_) && |
61 | 0 | (group_data_ == b.group_data_) && |
62 | 0 | (entity_factory_ == b.entity_factory_); |
63 | 0 | } |
64 | | |
65 | | /** |
66 | | * Getter for PresentationQosPolicy |
67 | | * |
68 | | * @return PresentationQosPolicy reference |
69 | | */ |
70 | | const PresentationQosPolicy& presentation() const |
71 | 0 | { |
72 | 0 | return presentation_; |
73 | 0 | } |
74 | | |
75 | | /** |
76 | | * Getter for PresentationQosPolicy |
77 | | * |
78 | | * @return PresentationQosPolicy reference |
79 | | */ |
80 | | PresentationQosPolicy& presentation() |
81 | 0 | { |
82 | 0 | return presentation_; |
83 | 0 | } |
84 | | |
85 | | /** |
86 | | * Setter for PresentationQosPolicy |
87 | | * |
88 | | * @param presentation new value for the PresentationQosPolicy |
89 | | */ |
90 | | void presentation( |
91 | | const PresentationQosPolicy& presentation) |
92 | 0 | { |
93 | 0 | presentation_ = presentation; |
94 | 0 | } |
95 | | |
96 | | /** |
97 | | * Getter for PartitionQosPolicy |
98 | | * |
99 | | * @return PartitionQosPolicy reference |
100 | | */ |
101 | | const PartitionQosPolicy& partition() const |
102 | 0 | { |
103 | 0 | return partition_; |
104 | 0 | } |
105 | | |
106 | | /** |
107 | | * Getter for PartitionQosPolicy |
108 | | * |
109 | | * @return PartitionQosPolicy reference |
110 | | */ |
111 | | PartitionQosPolicy& partition() |
112 | 0 | { |
113 | 0 | return partition_; |
114 | 0 | } |
115 | | |
116 | | /** |
117 | | * Setter for PartitionQosPolicy |
118 | | * |
119 | | * @param partition new value for the PartitionQosPolicy |
120 | | */ |
121 | | void partition( |
122 | | const PartitionQosPolicy& partition) |
123 | 0 | { |
124 | 0 | partition_ = partition; |
125 | 0 | } |
126 | | |
127 | | /** |
128 | | * Getter for GroupDataQosPolicy |
129 | | * |
130 | | * @return GroupDataQosPolicy reference |
131 | | */ |
132 | | const GroupDataQosPolicy& group_data() const |
133 | 0 | { |
134 | 0 | return group_data_; |
135 | 0 | } |
136 | | |
137 | | /** |
138 | | * Getter for GroupDataQosPolicy |
139 | | * |
140 | | * @return GroupDataQosPolicy reference |
141 | | */ |
142 | | GroupDataQosPolicy& group_data() |
143 | 0 | { |
144 | 0 | return group_data_; |
145 | 0 | } |
146 | | |
147 | | /** |
148 | | * Setter for GroupDataQosPolicy |
149 | | * |
150 | | * @param group_data new value for the GroupDataQosPolicy |
151 | | */ |
152 | | void group_data( |
153 | | const GroupDataQosPolicy& group_data) |
154 | 0 | { |
155 | 0 | group_data_ = group_data; |
156 | 0 | } |
157 | | |
158 | | /** |
159 | | * Getter for EntityFactoryQosPolicy |
160 | | * |
161 | | * @return EntityFactoryQosPolicy reference |
162 | | */ |
163 | | const EntityFactoryQosPolicy& entity_factory() const |
164 | 0 | { |
165 | 0 | return entity_factory_; |
166 | 0 | } |
167 | | |
168 | | /** |
169 | | * Getter for EntityFactoryQosPolicy |
170 | | * |
171 | | * @return EntityFactoryQosPolicy reference |
172 | | */ |
173 | | EntityFactoryQosPolicy& entity_factory() |
174 | 0 | { |
175 | 0 | return entity_factory_; |
176 | 0 | } |
177 | | |
178 | | /** |
179 | | * Setter for EntityFactoryQosPolicy |
180 | | * |
181 | | * @param entity_factory new value for the EntityFactoryQosPolicy |
182 | | */ |
183 | | void entity_factory( |
184 | | const EntityFactoryQosPolicy& entity_factory) |
185 | 0 | { |
186 | 0 | entity_factory_ = entity_factory; |
187 | 0 | } |
188 | | |
189 | | private: |
190 | | |
191 | | //!Presentation Qos, NOT implemented in the library. |
192 | | PresentationQosPolicy presentation_; |
193 | | |
194 | | //!Partition Qos, implemented in the library. |
195 | | PartitionQosPolicy partition_; |
196 | | |
197 | | //!Group Data Qos, implemented in the library. |
198 | | GroupDataQosPolicy group_data_; |
199 | | |
200 | | //!Entity Factory Qos, implemented in the library |
201 | | EntityFactoryQosPolicy entity_factory_; |
202 | | }; |
203 | | |
204 | | RTPS_DllAPI extern const SubscriberQos SUBSCRIBER_QOS_DEFAULT; |
205 | | |
206 | | |
207 | | } /* namespace dds */ |
208 | | } /* namespace fastdds */ |
209 | | } /* namespace eprosima */ |
210 | | |
211 | | #endif /* _FASTDDS_SUBSCRIBERQOS_HPP_ */ |