<<value-type>> Encapsulates a query for a dds::sub::cond::QueryCondition.
More...
#include <dds/sub/Query.hpp>
Public Member Functions |
template<typename T > |
| Query (const dds::sub::DataReader< T > &reader, const std::string &query_expression) |
| Creates a query.
|
|
template<typename T , typename FWIterator > |
| Query (const dds::sub::DataReader< T > &reader, const std::string &query_expression, const FWIterator ¶ms_begin, const FWIterator ¶ms_end) |
| Creates a query with the expression parameters in an iterator range.
|
|
template<typename T > |
| Query (const dds::sub::DataReader< T > &reader, const std::string &query_expression, const std::vector< std::string > ¶ms) |
| Creates a query with the expression parameters in a vector.
|
|
const std::string & | expression () const |
| Gets the expression.
|
|
const_iterator | begin () const |
| Provides the begin iterator to the parameter list.
|
|
const_iterator | end () const |
| Provides the end iterator to the parameter list.
|
|
iterator | begin () |
| Provides the begin iterator to the parameter list.
|
|
iterator | end () |
| Provides the end iterator to the parameter list.
|
|
template<typename FWIterator > |
void | parameters (const FWIterator &begin, const FWIterator end) |
| Sets the parameters for the expression.
|
|
void | add_parameter (const std::string ¶m) |
| Appends a parameter.
|
|
size_t | parameters_length () const |
| Gets the number of parameters.
|
|
const std::vector< std::string > & | parameters () const |
| <<extension>> Gets the parameters
|
|
const AnyDataReader & | data_reader () const |
| Gets the related DataReader.
|
|
Detailed Description
<<value-type>> Encapsulates a query for a dds::sub::cond::QueryCondition.
A query contains the DataReader to query data from, an expression and optionally a list of parameters.
Queries and Filters Syntax defines the syntax of the expression and the parameters.
- See Also
- Filtering with Query Conditions
Constructor & Destructor Documentation
template<typename T >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression |
|
) |
| |
|
inline |
Creates a query.
- Template Parameters
-
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
template<typename T , typename FWIterator >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression, |
|
|
const FWIterator & |
params_begin, |
|
|
const FWIterator & |
params_end |
|
) |
| |
|
inline |
Creates a query with the expression parameters in an iterator range.
- Template Parameters
-
T | The topic-type of the DataReader |
FWIterator | A forward iterator whose value type is std::string (or convertible to std::string) |
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
params_begin | The beginning of a range of parameters for the query expression |
params_end | The end of the range |
template<typename T >
dds::sub::Query::Query |
( |
const dds::sub::DataReader< T > & |
reader, |
|
|
const std::string & |
query_expression, |
|
|
const std::vector< std::string > & |
params |
|
) |
| |
|
inline |
Creates a query with the expression parameters in a vector.
- Template Parameters
-
- Parameters
-
reader | DataReader to query data from |
query_expression | Expression describing the query |
params | The parameters for the query expression |
Member Function Documentation
const std::string& dds::sub::Query::expression |
( |
| ) |
const |
|
inline |
const_iterator dds::sub::Query::begin |
( |
| ) |
const |
|
inline |
Provides the begin iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
const_iterator dds::sub::Query::end |
( |
| ) |
const |
|
inline |
Provides the end iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
iterator dds::sub::Query::begin |
( |
| ) |
|
|
inline |
Provides the begin iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
iterator dds::sub::Query::end |
( |
| ) |
|
|
inline |
Provides the end iterator to the parameter list.
- Returns
- A random-access iterator whose value type is std::string
template<typename FWIterator >
void dds::sub::Query::parameters |
( |
const FWIterator & |
begin, |
|
|
const FWIterator |
end |
|
) |
| |
|
inline |
Sets the parameters for the expression.
- Template Parameters
-
FWIterator | A forward iterator whose value type is std::string (or convertible to std::string) |
- Parameters
-
begin | The beginning of a range of parameters for the query expression |
end | The end of the range |
void dds::sub::Query::add_parameter |
( |
const std::string & |
param | ) |
|
|
inline |
size_t dds::sub::Query::parameters_length |
( |
| ) |
const |
|
inline |
Gets the number of parameters.
const std::vector<std::string>& dds::sub::Query::parameters |
( |
| ) |
const |