| Fast DDS Version 3.3.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
18
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
29 namespace eprosima {
30 namespace fastdds {
31 namespace dds {
32
33 class DomainParticipant;
34 class DomainParticipantImpl;
35 class ContentFilteredTopicImpl;
36
37 constexpr const char* const sqlfilter_name = "DDSSQL";
38
44 class ContentFilteredTopic : public TopicDescription
45{
46 friend class DomainParticipantImpl;
47
48 private:
49
50 ContentFilteredTopic(
51 const std::string& name,
52 Topic* related_topic,
53 const std::string& filter_expression,
54 const std::vector<std::string>& expression_parameters);
55
56 public:
57
58 virtual ~ContentFilteredTopic();
59
66 FASTDDS_EXPORTED_API Topic* get_related_topic() const;
67
77 FASTDDS_EXPORTED_API const std::string& get_filter_expression() const;
78
93 FASTDDS_EXPORTED_API ReturnCode_t get_expression_parameters(
94 std::vector<std::string>& expression_parameters) const;
95
106 FASTDDS_EXPORTED_API ReturnCode_t set_expression_parameters(
107 const std::vector<std::string>& expression_parameters);
108
122 FASTDDS_EXPORTED_API ReturnCode_t set_filter_expression(
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
134 protected:
135
136 ContentFilteredTopicImpl* impl_;
137
138};
139
140} // namespace dds
141} // namespace fastdds
142} // namespace eprosima
143
144#endif // FASTDDS_DDS_TOPIC__CONTENTFILTEREDTOPIC_HPP
eprosima::fastdds::dds::ContentFilteredTopic::~ContentFilteredTopic
virtual ~ContentFilteredTopic()
eprosima::fastdds::dds::ContentFilteredTopic::get_expression_parameters
FASTDDS_EXPORTED_API ReturnCode_t get_expression_parameters(std::vector< std::string > &expression_parameters) const
Get the expression parameters.
eprosima::fastdds::dds::ContentFilteredTopic::get_filter_expression
FASTDDS_EXPORTED_API const std::string & get_filter_expression() const
Get the filter expression.
eprosima::fastdds::dds::ContentFilteredTopic::get_related_topic
FASTDDS_EXPORTED_API Topic * get_related_topic() const
Getter for the related topic.
eprosima::fastdds::dds::ContentFilteredTopic::set_expression_parameters
FASTDDS_EXPORTED_API ReturnCode_t set_expression_parameters(const std::vector< std::string > &expression_parameters)
Set the expression parameters.
eprosima::fastdds::dds::ContentFilteredTopic::impl_
ContentFilteredTopicImpl * impl_
Definition ContentFilteredTopic.hpp:136
eprosima::fastdds::dds::ContentFilteredTopic::set_filter_expression
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.
eprosima::fastdds::dds::ContentFilteredTopic::get_participant
FASTDDS_EXPORTED_API DomainParticipant * get_participant() const override
Getter for the DomainParticipant.
eprosima::fastdds::dds::ContentFilteredTopic::get_impl
TopicDescriptionImpl * get_impl() const override
eprosima::fastdds::dds::ContentFilteredTopic::DomainParticipantImpl
friend class DomainParticipantImpl
Definition ContentFilteredTopic.hpp:46
eprosima::fastdds::dds::DomainParticipant
Class DomainParticipant used to group Publishers and Subscribers into a single working unit.
Definition DomainParticipant.hpp:86
eprosima::fastdds::dds::TopicDescription::TopicDescription
TopicDescription(const std::string &name, const std::string &type_name)
Definition TopicDescription.hpp:72
eprosima::fastdds::dds::Topic
Class Topic, represents the fact that both publications and subscriptions are tied to a single data-t...
Definition Topic.hpp:53
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::ReturnCode_t
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
eprosima::fastdds::dds::sqlfilter_name
constexpr const char *const sqlfilter_name
Definition ContentFilteredTopic.hpp:37
eprosima::fastdds
eprosima
eProsima namespace.