Cyclone ISO C++ API Reference Guide
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 
22 #include <dds/core/detail/conformance.hpp>
23 #include <dds/sub/cond/detail/QueryCondition.hpp>
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:
95  QueryCondition(const dds::sub::Query& query,
96  const dds::sub::status::DataState& status);
97 
118  template <typename FUN>
119  QueryCondition(const dds::sub::Query& query,
120  const dds::sub::status::DataState& status, FUN& functor);
121 
125  template <typename FUN>
126  QueryCondition(const dds::sub::Query& query,
127  const dds::sub::status::DataState& status, const FUN& functor);
128 
146  const std::string& expression,
147  const std::vector<std::string>& params,
148  const dds::sub::status::DataState& status);
149 
165  const dds::sub::status::DataState& status);
187  template <typename FUN>
189  const std::string& expression,
190  const std::vector<std::string>& params,
191  const dds::sub::status::DataState& status,
192  FUN& functor);
193 
194 
198  template <typename FUN>
200  const std::string& expression,
201  const std::vector<std::string>& params,
202  const dds::sub::status::DataState& status,
203  const FUN& functor);
204 
206  ~QueryCondition();
209 public:
217  void expression(const std::string& expr);
218 
227  const std::string& expression();
228 
238  const_iterator begin() const;
239 
249  const_iterator end() const;
250 
260  iterator begin();
261 
271  iterator end();
272 
283  template<typename FWIterator>
284  void parameters(const FWIterator& begin, const FWIterator end);
285 
295  void add_parameter(const std::string& param);
296 
305  uint32_t parameters_length() const;
306 
321  const dds::sub::AnyDataReader& data_reader() const;
322 };
323 
324 #endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
325 
326 #endif /* OMG_DDS_SUB_TQUERY_CONDITION_HPP_ */
dds::sub::Query
Query objects contain expressions that allow the application to specify a filter on the locally avail...
Definition: Query.hpp:61
dds::sub::cond::QueryCondition::parameters
void parameters(const FWIterator &begin, const FWIterator end)
dds::sub::cond::QueryCondition::QueryCondition
QueryCondition(const dds::sub::Query &query, const dds::sub::status::DataState &status)
dds::sub::cond::QueryCondition::end
const_iterator end() const
dds::sub::cond::QueryCondition::iterator
DELEGATE::iterator iterator
Definition: QueryCondition.hpp:75
dds::sub::cond::QueryCondition::data_reader
const dds::sub::AnyDataReader & data_reader() const
dds::sub::status::DataState
Class to hold sample DataState information.
Definition: DataState.hpp:371
dds::sub::cond::QueryCondition::const_iterator
DELEGATE::const_iterator const_iterator
Definition: QueryCondition.hpp:80
dds::sub::cond::QueryCondition::add_parameter
void add_parameter(const std::string &param)
OMG_DDS_IMPLICIT_REF_BASE
#define OMG_DDS_IMPLICIT_REF_BASE(TYPE)
Definition: refmacros.hpp:75
OMG_DDS_REF_TYPE_PROTECTED_DC
#define OMG_DDS_REF_TYPE_PROTECTED_DC(TYPE, BASE, DELEGATE)
Definition: refmacros.hpp:164
dds::sub::cond::ReadCondition
ReadCondition objects are conditions specifically dedicated to read operations and attached to one Da...
Definition: ReadCondition.hpp:63
dds::sub::cond::QueryCondition::begin
const_iterator begin() const
dds
Definition: array.hpp:30
dds::sub::cond::QueryCondition::parameters_length
uint32_t parameters_length() const
dds::sub::AnyDataReader
Typeless base class for the typed DataReader.
Definition: AnyDataReader.hpp:50
ReadCondition.hpp
dds::sub::cond::QueryCondition
QueryCondition objects are specialized ReadCondition objects that allow the application to also speci...
Definition: QueryCondition.hpp:62
dds::sub::cond::QueryCondition::expression
const std::string & expression()