/* * Copyright(c) 2006 to 2020 ZettaScale Technology and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License * v. 1.0 which is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ #ifndef CYCLONEDDS_DDS_SUB_DETAIL_QUERY_IMPL_HPP_ #define CYCLONEDDS_DDS_SUB_DETAIL_QUERY_IMPL_HPP_ /** * @file */ // Implementation #include template dds::sub::TQuery::TQuery( const dds::sub::AnyDataReader& dr, const std::string& expression) : dds::core::Reference(new DELEGATE(AnyDataReader(dr), expression)) { } template template dds::sub::TQuery::TQuery( const dds::sub::AnyDataReader& dr, const std::string& expression, const FWIterator& params_begin, const FWIterator& params_end) : dds::core::Reference(new DELEGATE(AnyDataReader(dr), expression)) { for (FWIterator it = params_begin; it != params_end; ++it) { add_parameter(*it); } } template dds::sub::TQuery::TQuery( const dds::sub::AnyDataReader& dr, const std::string& expression, const std::vector& params) : dds::core::Reference(new DELEGATE(AnyDataReader(dr), expression, params)) { } template const std::string& dds::sub::TQuery::expression() const { return this->delegate()->expression(); } template void dds::sub::TQuery::expression(const std::string& expr) { this->delegate()->expression(expr); } /** * Provides the begin iterator to the parameter list. */ template typename dds::sub::TQuery::const_iterator dds::sub::TQuery::begin() const { return this->delegate()->begin(); } /** * The end iterator to the parameter list. */ template typename dds::sub::TQuery::const_iterator dds::sub::TQuery::end() const { return this->delegate()->end(); } /** * Provides the begin iterator to the parameter list. */ template typename dds::sub::TQuery::iterator dds::sub::TQuery::begin() { return this->delegate()->begin(); } /** * The end iterator to the parameter list. */ template typename dds::sub::TQuery::iterator dds::sub::TQuery::end() { return this->delegate()->end(); } template template void dds::sub::TQuery::parameters( const FWIterator& begin, const FWIterator end) { for (FWIterator it = begin; it != end; ++it) { add_parameter(*it); } } template void dds::sub::TQuery::add_parameter( const std::string& param) { this->delegate()->add_parameter(param); } template uint32_t dds::sub::TQuery::parameters_length() const { return this->delegate()->parameters_length(); } template const dds::sub::AnyDataReader& dds::sub::TQuery::data_reader() const { return this->delegate()->data_reader(); } #endif /* CYCLONEDDS_DDS_SUB_DETAIL_QUERY_IMPL_HPP_ */