![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
Query objects contain expressions that allow the application to specify a filter on the locally available data. More...
#include "Query.hpp"

Public Types | |
| typedef DELEGATE::const_iterator | const_iterator |
| typedef DELEGATE::iterator | iterator |
Public Member Functions | |
| Query (const dds::sub::AnyDataReader &dr, const std::string &expression) | |
| template<typename FWIterator > | |
| Query (const dds::sub::AnyDataReader &dr, const std::string &expression, const FWIterator ¶ms_begin, const FWIterator ¶ms_end) | |
| Query (const dds::sub::AnyDataReader &dr, const std::string &expression, const std::vector< std::string > ¶ms) | |
| void | add_parameter (const std::string ¶m) |
| const_iterator | begin () const |
| iterator | begin () |
| const AnyDataReader & | data_reader () const |
| const_iterator | end () const |
| iterator | end () |
| const std::string & | expression () const |
| void | expression (const std::string &expr) |
| bool | is_nil () const |
| template<typename R > | |
| bool | operator!= (const R &ref) const |
| bool | operator!= (const null_type nil) const |
| DELEGATE * | operator-> () |
| const DELEGATE * | operator-> () const |
| template<typename R > | |
| bool | operator== (const R &ref) const |
| bool | operator== (const null_type) const |
| template<typename FWIterator > | |
| void | parameters (const FWIterator &begin, const FWIterator end) |
| uint32_t | parameters_length () const |
Query objects contain expressions that allow the application to specify a filter on the locally available data.
A Query is used in a QueryCondition or DataReader::Selector and is associated with one DataReader.
| typedef DELEGATE::const_iterator dds::sub::Query::const_iterator |
| typedef DELEGATE::iterator dds::sub::Query::iterator |
| dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
| const std::string & | expression | ||
| ) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
| dr | The AnyDataReader to associate with the Query. |
| expression | SQL expression |
| dds::core::Exception |
Definition at line 32 of file QueryImpl.hpp.
| dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
| const std::string & | expression, | ||
| const FWIterator & | params_begin, | ||
| const FWIterator & | params_end | ||
| ) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
| dr | The AnyDataReader to associate with the Query. |
| expression | SQL expression |
| params_begin | Iterator pointing to the beginning of the parameters to set |
| params_end | Iterator pointing to the end of the parameters to set |
| dds::core::Exception |
| dds::sub::Query::Query | ( | const dds::sub::AnyDataReader & | dr, |
| const std::string & | expression, | ||
| const std::vector< std::string > & | params | ||
| ) |
Create a dds::sub::Query associated with an dds::sub::AnyDataReader.
| dr | The AnyDataReader to associate with the Query. |
| expression | SQL expression |
| params | Vector containing SQL expression parameters |
| dds::core::Exception |
Definition at line 60 of file QueryImpl.hpp.
| void dds::sub::Query::add_parameter | ( | const std::string & | param | ) |
Adds a parameter to the query.
| param | The parameter to add |
| dds::core::Exception |
Definition at line 147 of file QueryImpl.hpp.
| dds::sub::Query::const_iterator dds::sub::Query::begin | ( | ) | const |
Provides the begin iterator to the SQL expression parameter list.
| dds::core::Exception | Provides the begin iterator to the parameter list. |
Definition at line 89 of file QueryImpl.hpp.
| dds::sub::Query::iterator dds::sub::Query::begin | ( | ) |
Provides the begin iterator to the SQL expression parameter list.
| dds::core::Exception | Provides the begin iterator to the parameter list. |
Definition at line 111 of file QueryImpl.hpp.
| const dds::sub::AnyDataReader & dds::sub::Query::data_reader | ( | ) | const |
This operation returns the DataReader associated with the Query.
Note that there is exactly one DataReader associated with each Query.
| dds::core::Exception |
Definition at line 165 of file QueryImpl.hpp.
| dds::sub::Query::const_iterator dds::sub::Query::end | ( | ) | const |
The end iterator to the SQL expression parameter list.
| dds::core::Exception | The end iterator to the parameter list. |
Definition at line 100 of file QueryImpl.hpp.
| dds::sub::Query::iterator dds::sub::Query::end | ( | ) |
The end iterator to the SQL expression parameter list.
| dds::core::Exception | The end iterator to the parameter list. |
Definition at line 122 of file QueryImpl.hpp.
| const std::string & dds::sub::Query::expression | ( | ) | const |
Get expression.
| dds::core::Exception |
Definition at line 70 of file QueryImpl.hpp.
| void dds::sub::Query::expression | ( | const std::string & | expr | ) |
Set new expression.
| expr | ref anchor_dds_sub_query_expression "SQL expression" |
| dds::core::Exception |
Definition at line 78 of file QueryImpl.hpp.
|
inherited |
Check if the referenced object is nil.
In other words, check if the reference is pointing to a null object.
Definition at line 143 of file ReferenceImpl.hpp.
|
inherited |
Compares two Reference objects and returns true if they are not equal.
Inequality is based on the referential inequality of the object being pointed to.
| ref | the other Reference object |
Definition at line 100 of file ReferenceImpl.hpp.
|
inherited |
Special operator!= used to check if this reference object does not equal the dds::core::null reference.
The non-null-check can be done like this:
Definition at line 157 of file ReferenceImpl.hpp.
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:
Definition at line 180 of file ReferenceImpl.hpp.
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:
Definition at line 188 of file ReferenceImpl.hpp.
|
inherited |
Compares two Reference objects and returns true if they are equal.
Equality is based on the referential equality of the object being pointed.
| ref | the other Reference object |
Definition at line 83 of file ReferenceImpl.hpp.
|
inherited |
Special operator== used to check if this reference object equals the dds::core::null reference.
The null-check can be done like this:
Definition at line 150 of file ReferenceImpl.hpp.
| void dds::sub::Query::parameters | ( | const FWIterator & | begin, |
| const FWIterator | end | ||
| ) |
Sets the query parameters.
| begin | Iterator pointing to the beginning of the parameters to set |
| end | Iterator pointing to the end of the parameters to set |
| dds::core::Exception |
Definition at line 131 of file QueryImpl.hpp.
| uint32_t dds::sub::Query::parameters_length | ( | ) | const |
Gets the number of parameters in the query.
| dds::core::Exception |
Definition at line 156 of file QueryImpl.hpp.