Fast DDS  Version 3.6.1.0
Fast DDS
Condition.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 
20 #ifndef FASTDDS_DDS_CORE_CONDITION__CONDITION_HPP
21 #define FASTDDS_DDS_CORE_CONDITION__CONDITION_HPP
22 
23 #include <memory>
24 #include <vector>
25 
26 #include <fastdds/dds/log/Log.hpp>
27 #include <fastdds/fastdds_dll.hpp>
28 
29 namespace eprosima {
30 namespace fastdds {
31 namespace dds {
32 
33 // Forward declaration of implementation details
34 namespace detail {
35 struct ConditionNotifier;
36 } // namespace detail
37 
41 class Condition
42 {
43 public:
44 
49  FASTDDS_EXPORTED_API virtual bool get_trigger_value() const
50  {
51  EPROSIMA_LOG_WARNING(CONDITION, "get_trigger_value public member function not implemented");
52  return false; // TODO return trigger value
53  }
54 
55  detail::ConditionNotifier* get_notifier() const
56  {
57  return notifier_.get();
58  }
59 
60 protected:
61 
63  virtual ~Condition();
64 
65  std::unique_ptr<detail::ConditionNotifier> notifier_;
66 };
67 
68 using ConditionSeq = std::vector<Condition*>;
69 
70 } // namespace dds
71 } // namespace fastdds
72 } // namespace eprosima
73 
74 #endif // FASTDDS_DDS_CORE_CONDITION__CONDITION_HPP
The Condition class is the root base class for all the conditions that may be attached to a WaitSet.
Definition: Condition.hpp:42
std::unique_ptr< detail::ConditionNotifier > notifier_
Definition: Condition.hpp:65
virtual FASTDDS_EXPORTED_API bool get_trigger_value() const
Retrieves the trigger_value of the Condition.
Definition: Condition.hpp:49
detail::ConditionNotifier * get_notifier() const
Definition: Condition.hpp:55
Definition: DomainParticipant.hpp:46
std::vector< Condition * > ConditionSeq
Definition: Condition.hpp:68