OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
QueryCondition.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_SUB_TQUERY_CONDITION_HPP_
2 #define OMG_DDS_SUB_TQUERY_CONDITION_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 
25 
26 
27 #ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
28 
29 namespace dds
30 {
31 namespace sub
32 {
33 namespace cond
34 {
35 
36 class QueryCondition;
37 }
38 }
39 }
40 
64  public dds::sub::Query
65 {
66 public:
69 
70 public:
71  // Random access iterators
75  typedef typename DELEGATE::iterator iterator;
76 
80  typedef typename DELEGATE::const_iterator const_iterator;
81 
82 public:
97  QueryCondition(const dds::sub::Query& query,
98  const dds::sub::status::DataState& status);
99 
120  template <typename FUN>
121  QueryCondition(const dds::sub::Query& query,
122  const dds::sub::status::DataState& status, FUN& functor);
123 
127  template <typename FUN>
128  QueryCondition(const dds::sub::Query& query,
129  const dds::sub::status::DataState& status, const FUN& functor);
130 
148  const std::string& expression,
149  const std::vector<std::string>& params,
150  const dds::sub::status::DataState& status);
151 
173  template <typename FUN>
175  const std::string& expression,
176  const std::vector<std::string>& params,
177  const dds::sub::status::DataState& status,
178  FUN& functor);
179 
183  template <typename FUN>
185  const std::string& expression,
186  const std::vector<std::string>& params,
187  const dds::sub::status::DataState& status,
188  const FUN& functor);
189 
191  ~QueryCondition();
194 public:
202  void expression(const std::string& expr);
203 
212  const std::string& expression();
213 
223  const_iterator begin() const;
224 
234  const_iterator end() const;
235 
245  iterator begin();
246 
256  iterator end();
257 
268  template<typename FWIterator>
269  void parameters(const FWIterator& begin, const FWIterator end);
270 
280  void add_parameter(const std::string& param);
281 
290  uint32_t parameters_length() const;
291 
306  const dds::sub::AnyDataReader& data_reader() const;
307 };
308 
309 #endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
310 
311 #endif /* OMG_DDS_SUB_TQUERY_CONDITION_HPP_ */
void add_parameter(const std::string &param)
QueryCondition objects are specialized ReadCondition objects that allow the application to also speci...
#define OMG_DDS_IMPLICIT_REF_BASE(TYPE)
Definition: refmacros.hpp:70
Query objects contain expressions that allow the application to specify a filter on the locally avail...
Definition: Query.hpp:61
Class to hold sample DataState information.
Definition: DataState.hpp:371
Typeless base class for the typed DataReader.
ReadCondition objects are conditions specifically dedicated to read operations and attached to one Da...
const dds::sub::AnyDataReader & data_reader() const
void parameters(const FWIterator &begin, const FWIterator end)
Definition: array.hpp:23
DELEGATE::const_iterator const_iterator
#define OMG_DDS_REF_TYPE_PROTECTED_DC(TYPE, BASE, DELEGATE)
Definition: refmacros.hpp:159
QueryCondition(const dds::sub::Query &query, const dds::sub::status::DataState &status)