RTI Connext Modern C++ API  Version 6.1.0
rti::sub::TopicQuerySelection Class Reference

<<extension>> <<value-type>> Specifies the data query that defines a TopicQuery. More...

#include <rti/sub/TopicQuery.hpp>

Public Types

typedef TopicQuerySelectionKind Kind
 Alias for TopicQuerySelectionKind. More...
 

Public Member Functions

 TopicQuerySelection (const dds::topic::Filter &the_filter)
 Creates a TopicQuerySelection. More...
 
 TopicQuerySelection (const dds::topic::Filter &the_filter, Kind the_kind)
 Creates a TopicQuerySelection with a selection kind. More...
 
dds::topic::Filterfilter ()
 Gets the filter. More...
 
const dds::topic::Filterfilter () const
 Gets the filter. More...
 
Kind kind () const
 Gets the selection kind. More...
 
TopicQuerySelectionkind (Kind the_kind)
 Indicates whether the sample selection is limited to cached samples or not. More...
 

Detailed Description

<<extension>> <<value-type>> Specifies the data query that defines a TopicQuery.

A TopicQuerySelection is defined by a dds::topic::Filter that selects a subset of samples in the dds::pub::DataWriters

Member Typedef Documentation

◆ Kind

Alias for TopicQuerySelectionKind.

Constructor & Destructor Documentation

◆ TopicQuerySelection() [1/2]

rti::sub::TopicQuerySelection::TopicQuerySelection ( const dds::topic::Filter the_filter)
inlineexplicit

Creates a TopicQuerySelection.

Parameters
the_filterDefines the data query
Note
The filter expression can start with the special condition "@instance_state = ALIVE AND" followed by the rest of the expression. This restricts the selection to samples of alive instances.
See also
TopicQuery::SelectAll()
TopicQuery::UseReaderContentFilter()

◆ TopicQuerySelection() [2/2]

rti::sub::TopicQuerySelection::TopicQuerySelection ( const dds::topic::Filter the_filter,
Kind  the_kind 
)
inline

Creates a TopicQuerySelection with a selection kind.

Parameters
the_filterDefines the data query
the_kindIndicates the kind of selection

Member Function Documentation

◆ filter() [1/2]

dds::topic::Filter& rti::sub::TopicQuerySelection::filter ( )
inline

Gets the filter.

Referenced by kind().

◆ filter() [2/2]

const dds::topic::Filter& rti::sub::TopicQuerySelection::filter ( ) const
inline

Gets the filter.

◆ kind() [1/2]

Kind rti::sub::TopicQuerySelection::kind ( ) const
inline

Gets the selection kind.

Referenced by kind().

◆ kind() [2/2]

TopicQuerySelection& rti::sub::TopicQuerySelection::kind ( Kind  the_kind)
inline

Indicates whether the sample selection is limited to cached samples or not.

[default] rti::sub::TopicQuerySelectionKind::HISTORY_SNAPSHOT

References filter(), kind(), rti::sub::operator==(), and rti::sub::swap().