RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::topic::Filter Class Reference

Defines the filter to create a ContentFilteredTopic. More...

#include <dds/topic/Filter.hpp>

Public Member Functions

 Filter (const std::string &filter_expression)
 Creates a filter with a expression with no parameters.
 
template<typename FwdIterator >
 Filter (const std::string &filter_expression, const FwdIterator &params_begin, const FwdIterator &params_end)
 Creates a filter with an expression that contains parameters.
 
 Filter (const std::string &query_expression, const std::vector< std::string > &params)
 Creates a filter with an expression that contains parameters.
 
const std::string & expression () const
 Gets the filter expression.
 
const_iterator begin () const
 Provides the begin iterator to the parameter list.
 
const_iterator end () const
 The end iterator to the parameter list.
 
iterator begin ()
 Provides the begin iterator to the parameter list.
 
iterator end ()
 The end iterator to the parameter list.
 
template<typename FwdITerator >
Filterparameters (const FwdITerator &the_begin, const FwdITerator the_end)
 Modifies the parameters.
 
Filteradd_parameter (const std::string &param)
 Appends a parameter.
 
size_t parameters_length () const
 Gets the number of parameters.
 
std::string name () const
 <<extension>> Gets the filter name
 
dds::topic::Filtername (const std::string &the_name)
 <<extension>> Sets a filter name
 

Detailed Description

Defines the filter to create a ContentFilteredTopic.

Contains the filter expression and optionally the expression parameters. It also contains the filter name, which allows selecting the filter class to use–by default it's the built-in SQL filter.

Constructor & Destructor Documentation

dds::topic::Filter::Filter ( const std::string &  filter_expression)
inline

Creates a filter with a expression with no parameters.

See Also
Queries and Filters Syntax
template<typename FwdIterator >
dds::topic::Filter::Filter ( const std::string &  filter_expression,
const FwdIterator &  params_begin,
const FwdIterator &  params_end 
)
inline

Creates a filter with an expression that contains parameters.

Template Parameters
FwdIteratorA forwar iterator whose value type is std::string (or convertible to)
Parameters
filter_expressionThe filter expression
params_beginThe beginning of the range of expression parameters
params_endThe end of the range (the number of parameter to create a ContentFilteredTopic can't exceed 100)
See Also
Queries and Filters Syntax
dds::topic::Filter::Filter ( const std::string &  query_expression,
const std::vector< std::string > &  params 
)
inline

Creates a filter with an expression that contains parameters.

Parameters
query_expressionThe query expression
paramsThe expression parameters (the number of parameter to create a ContentFilteredTopic can't exceed 100)
See Also
Queries and Filters Syntax

Member Function Documentation

const std::string& dds::topic::Filter::expression ( ) const
inline

Gets the filter expression.

const_iterator dds::topic::Filter::begin ( ) const
inline

Provides the begin iterator to the parameter list.

const_iterator dds::topic::Filter::end ( ) const
inline

The end iterator to the parameter list.

iterator dds::topic::Filter::begin ( )
inline

Provides the begin iterator to the parameter list.

iterator dds::topic::Filter::end ( )
inline

The end iterator to the parameter list.

template<typename FwdITerator >
Filter& dds::topic::Filter::parameters ( const FwdITerator &  the_begin,
const FwdITerator  the_end 
)
inline

Modifies the parameters.

Filter& dds::topic::Filter::add_parameter ( const std::string &  param)
inline

Appends a parameter.

size_t dds::topic::Filter::parameters_length ( ) const
inline

Gets the number of parameters.

std::string name ( ) const

<<extension>> Gets the filter name

Returns
The name of the filter, or an empty string when using the default SQL filter.
Examples:
USER_QOS_PROFILES.xml.
dds::topic::Filter & name ( const std::string &  the_name)

<<extension>> Sets a filter name

You can use one of the built-in filters: rti::topic::SQLFILTER_NAME and rti::topic::STRINGMATCHFILTER_NAME. Or a custom filter, which you need to register using dds::domain::DomainParticipant::register_contentfilter().

[default] Empty string (equivalent to rti::topic::SQLFILTER_NAME)


RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc