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