RTI Connext Modern C++ API  Version 5.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::sub::cond::QueryCondition Class Reference

<<reference-type>> Specialized ReadCondition that allows applications to also specify a filter on the data available in a dds::sub::DataReader More...

#include <dds/sub/cond/QueryCondition.hpp>

Inheritance diagram for dds::sub::cond::QueryCondition:
dds::sub::cond::ReadCondition dds::core::cond::Condition

Public Types

typedef DELEGATE::iterator iterator
 Parameter iterator. A random-access iterator of std::string.
 
typedef DELEGATE::const_iterator const_iterator
 Parameter iterator. A random-access iterator of std::string.
 

Public Member Functions

 QueryCondition (const dds::sub::Query &query, const dds::sub::status::DataState &status)
 Creates a QueryCondition.
 
template<typename Functor >
 QueryCondition (const dds::sub::Query &query, const dds::sub::status::DataState &status, const Functor &functor)
 Creates a QueryCondition with a handler.
 
std::string expression () const
 Gets the expression.
 
dds::core::StringSeq parameters () const
 Gets the parameters.
 
template<typename FWIterator >
void parameters (const FWIterator &begin, const FWIterator &end)
 Modifies the query parameters.
 
uint32_t parameters_length () const
 Gets the number of parameters.
 
void parameters (const dds::core::StringSeq &parameters)
 <<extension>> Set the parameters
 
- Public Member Functions inherited from dds::sub::cond::ReadCondition
template<typename T >
 ReadCondition (const dds::sub::DataReader< T > &reader, const dds::sub::status::DataState &status)
 Creates a ReadCondition.
 
template<typename T , typename Functor >
 ReadCondition (const dds::sub::DataReader< T > &reader, const dds::sub::status::DataState &status, const Functor &handler)
 Creates a ReadCondition with a handler.
 
const dds::sub::status::DataState state_filter () const
 Returns the DataState of this condition.
 
const AnyDataReaderdata_reader () const
 Returns the DataReader associated to this condition.
 
- Public Member Functions inherited from dds::core::cond::Condition
void dispatch ()
 Dispatches the functors that have been registered with the condition.
 
bool trigger_value () const
 This operation retrieves the trigger_value of the Condition.
 

Detailed Description

<<reference-type>> Specialized ReadCondition that allows applications to also specify a filter on the data available in a dds::sub::DataReader

Each query condition filter is composed of a dds::sub::cond::ReadCondition state filter and a content filter expressed as a query_expression and query_parameters.

The query (query_expression) is similar to an SQL WHERE clause and can be parameterised by arguments that are dynamically changeable by the set_query_parameters() operation.

Two query conditions that have the same query_expression will require unique query condition content filters if their query_paramters differ. Query conditions that differ only in their state masks will share the same query condition content filter.

Queries and Filters Syntax describes the syntax of query_expression and query_parameters.

See Also
Filtering with Query Conditions

Member Typedef Documentation

typedef DELEGATE::iterator dds::sub::cond::QueryCondition::iterator

Parameter iterator. A random-access iterator of std::string.

typedef DELEGATE::const_iterator dds::sub::cond::QueryCondition::const_iterator

Parameter iterator. A random-access iterator of std::string.

Constructor & Destructor Documentation

dds::sub::cond::QueryCondition::QueryCondition ( const dds::sub::Query query,
const dds::sub::status::DataState status 
)
inline

Creates a QueryCondition.

Parameters
queryThe query
statusThe sample, view and instance states of interest.
See Also
ReadCondition
template<typename Functor >
dds::sub::cond::QueryCondition::QueryCondition ( const dds::sub::Query query,
const dds::sub::status::DataState status,
const Functor &  functor 
)
inline

Creates a QueryCondition with a handler.

This constructor is similar to this ReadCondition constructor.

Member Function Documentation

std::string dds::sub::cond::QueryCondition::expression ( ) const
inline

Gets the expression.

dds::core::StringSeq dds::sub::cond::QueryCondition::parameters ( ) const
inline

Gets the parameters.

Provides the begin iterator to the parameter list. The end iterator to the parameter list. Provides the begin iterator to the parameter list. The end iterator to the parameter list.

template<typename FWIterator >
void dds::sub::cond::QueryCondition::parameters ( const FWIterator &  begin,
const FWIterator &  end 
)
inline

Modifies the query parameters.

Template Parameters
FWIteratorA forward iterator whose value type is std::string (or convertible to std::string).
Parameters
beginThe beginning of the range of parameters
endThe end of the range
uint32_t dds::sub::cond::QueryCondition::parameters_length ( ) const
inline

Gets the number of parameters.

void parameters ( const dds::core::StringSeq parameters)

<<extension>> Set the parameters


RTI Connext Modern C++ API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc