DDS-PSM-C++  1.0
ISO C++ API for OpenSplice DDS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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/sub/DataReader.hpp>
23 //#include <dds/sub/Query.hpp>
26 
27 
28 
29 #ifdef OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
30 
31 namespace dds { namespace sub { namespace cond {
32  class QueryCondition;
33 } } }
34 
47 class dds::sub::cond::QueryCondition : public dds::sub::cond::TReadCondition<detail::QueryCondition> {
48 public:
49  typedef detail::QueryCondition DELEGATE;
50 public:
51  // Random access iterators
52  typedef DELEGATE::iterator iterator;
53  typedef DELEGATE::const_iterator const_iterator;
54 public:
55  // OMG_DDS_REF_TYPE(TQueryCondition, dds::sub::cond::TReadCondition, DELEGATE)
56 
57  QueryCondition(const dds::sub::Query& query,
58  const dds::sub::status::DataState& status);
59 
60  ~QueryCondition();
61 
62 public:
63 
64  void expression(const std::string& expr);
65  const std::string& expression();
66 
70  const_iterator begin() const;
71 
75  const_iterator end() const;
76 
80  iterator begin();
81 
85  iterator end();
86 
87  template<typename FWIterator>
88  void parameters(const FWIterator& begin, const FWIterator end);
89 
90  void add_parameter(const std::string& param);
91 
92  uint32_t parameters_length() const;
93 };
94 
95 #endif // OMG_DDS_CONTENT_SUBSCRIPTION_SUPPORT
96 
97 #endif /* OMG_DDS_SUB_TQUERY_CONDITION_HPP_ */