Fast DDS  Version 3.0.0
Fast DDS
Loading...
Searching...
No Matches
ContentFilteredTopic.hpp
1// Copyright 2021 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__CONTENTFILTEREDTOPIC_HPP
20#define FASTDDS_DDS_TOPIC__CONTENTFILTEREDTOPIC_HPP
21
22#include <fastdds/dds/core/ReturnCode.hpp>
23#include <fastdds/dds/topic/TopicDescription.hpp>
24#include <fastdds/dds/topic/Topic.hpp>
25#include <fastdds/fastdds_dll.hpp>
26
27#define FASTDDS_SQLFILTER_NAME eprosima::fastdds::dds::sqlfilter_name
28
29namespace eprosima {
30namespace fastdds {
31namespace dds {
32
33class DomainParticipant;
34class DomainParticipantImpl;
35class ContentFilteredTopicImpl;
36
37constexpr const char* const sqlfilter_name = "DDSSQL";
38
45{
47
48private:
49
51 const std::string& name,
52 Topic* related_topic,
53 const std::string& filter_expression,
54 const std::vector<std::string>& expression_parameters);
55
56public:
57
59
66 FASTDDS_EXPORTED_API Topic* get_related_topic() const;
67
77 FASTDDS_EXPORTED_API const std::string& get_filter_expression() const;
78
94 std::vector<std::string>& expression_parameters) const;
95
107 const std::vector<std::string>& expression_parameters);
108
123 const std::string& filter_expression,
124 const std::vector<std::string>& expression_parameters);
125
130 FASTDDS_EXPORTED_API DomainParticipant* get_participant() const override;
131
132 TopicDescriptionImpl* get_impl() const override;
133
134protected:
135
136 ContentFilteredTopicImpl* impl_;
137
138};
139
140} // namespace dds
141} // namespace fastdds
142} // namespace eprosima
143
144#endif // FASTDDS_DDS_TOPIC__CONTENTFILTEREDTOPIC_HPP
Specialization of TopicDescription that allows for content-based subscriptions.
Definition ContentFilteredTopic.hpp:45
FASTDDS_EXPORTED_API ReturnCode_t get_expression_parameters(std::vector< std::string > &expression_parameters) const
Get the expression parameters.
FASTDDS_EXPORTED_API const std::string & get_filter_expression() const
Get the filter expression.
FASTDDS_EXPORTED_API Topic * get_related_topic() const
Getter for the related topic.
FASTDDS_EXPORTED_API ReturnCode_t set_expression_parameters(const std::vector< std::string > &expression_parameters)
Set the expression parameters.
ContentFilteredTopicImpl * impl_
Definition ContentFilteredTopic.hpp:136
FASTDDS_EXPORTED_API ReturnCode_t set_filter_expression(const std::string &filter_expression, const std::vector< std::string > &expression_parameters)
Set the filter expression and the expression parameters.
FASTDDS_EXPORTED_API DomainParticipant * get_participant() const override
Getter for the DomainParticipant.
TopicDescriptionImpl * get_impl() const override
friend class DomainParticipantImpl
Definition ContentFilteredTopic.hpp:46
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
Class Topic, represents the fact that both publications and subscriptions are tied to a single data-t...
Definition Topic.hpp:53
Definition DomainParticipant.hpp:45
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
constexpr const char *const sqlfilter_name
Definition ContentFilteredTopic.hpp:37
eProsima namespace.