OpenSplice ISO C++ 2 DCPS  v7.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
WaitSet.hpp
Go to the documentation of this file.
1 #ifndef OMG_TDDS_CORE_WAIT_SET_HPP_
2 #define OMG_TDDS_CORE_WAIT_SET_HPP_
3 
4 /* Copyright 2010, Object Management Group, Inc.
5  * Copyright 2010, PrismTech, Corp.
6  * Copyright 2010, Real-Time Innovations, Inc.
7  * All rights reserved.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #include <vector>
23 
24 #include <dds/core/types.hpp>
25 #include <dds/core/Duration.hpp>
28 
29 namespace dds
30 {
31 namespace core
32 {
33 namespace cond
34 {
35 
36 class WaitSet;
37 }
38 }
39 }
40 
41 
112 {
113 public:
114  typedef std::vector<dds::core::cond::Condition> ConditionSeq;
115 
116 public:
119 
120 public:
130  WaitSet();
131 
133  ~WaitSet();
136 public:
176  const ConditionSeq wait(const dds::core::Duration& timeout);
177 
208  const ConditionSeq wait();
209 
251  ConditionSeq& wait(ConditionSeq& triggered,
252  const dds::core::Duration& timeout);
253 
286  ConditionSeq& wait(ConditionSeq& triggered);
287 
288 public:
304  void dispatch();
305 
327  void dispatch(const dds::core::Duration& timeout);
328 
329 public:
332 
335 
358 
377 
395  const ConditionSeq conditions() const;
396 
415  ConditionSeq& conditions(ConditionSeq& conds) const;
416 };
417 
418 #endif /* OMG_TDDS_CORE_WAIT_SET_HPP_ */
#define OMG_DDS_IMPLICIT_REF_BASE(TYPE)
Definition: refmacros.hpp:70
const ConditionSeq conditions() const
bool detach_condition(const dds::core::cond::Condition &cond)
WaitSet & operator+=(const dds::core::cond::Condition &cond)
Definition: WaitSetImpl.hpp:97
Definition: array.hpp:23
const ConditionSeq wait()
Definition: WaitSetImpl.hpp:61
WaitSet & attach_condition(const dds::core::cond::Condition &cond)
A WaitSet object allows an application to wait until one or more of the attached Condition objects ha...
Definition: WaitSet.hpp:111
Base class for reference-counted objects.
Definition: Reference.hpp:94
#define OMG_DDS_REF_TYPE_NO_DC(TYPE, BASE, DELEGATE)
Definition: refmacros.hpp:173
WaitSet & operator-=(const dds::core::cond::Condition &cond)
This class is the base class for all the conditions that may be attached to a dds::core::cond::WaitSe...
Definition: Condition.hpp:58
std::vector< dds::core::cond::Condition > ConditionSeq
Definition: WaitSet.hpp:114