RTI Connext Modern C++ API
Version 5.3.0
|
<<extension>> <<reference-type>> Allows a dds::sub::DataReader to query the sample cache of its matching dds::pub::DataWriters. More...
#include <rti/sub/TopicQuery.hpp>
Inherits dds::core::Reference< DELEGATE >.
Public Member Functions | |
TopicQuery (dds::sub::AnyDataReader reader, const TopicQuerySelection &selection) | |
Creates a TopicQuery for a given DataReader. | |
void | close () |
Deletes and cancels this TopicQuery. | |
const rti::core::Guid | guid () const |
Gets the TopicQuery GUID. | |
bool | closed () const |
Indicates whether this TopicQuery has been closed with close(). | |
dds::sub::AnyDataReader | datareader () const |
Gets the DataReader associated to this TopicQuery. | |
![]() | |
Reference (dds::core::null_type &) | |
Reference (const Reference &ref) | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
~Reference () | |
template<typename R > | |
bool | operator== (const R &ref) const |
template<typename R > | |
bool | operator!= (const R &ref) const |
Reference & | operator= (const null_type) |
bool | is_nil () const |
bool | operator== (const null_type) const |
bool | operator!= (const null_type) const |
const DELEGATE_REF_T & | delegate () const OMG_NOEXCEPT |
DELEGATE_REF_T & | delegate () OMG_NOEXCEPT |
DELEGATE * | operator-> () OMG_NOEXCEPT |
const DELEGATE * | operator-> () const OMG_NOEXCEPT |
Static Public Member Functions | |
static TopicQuery | UseReaderContentFilter (dds::sub::AnyDataReader reader) |
Creates a TopicQuery with the same filter as this reader's ContentFilteredTopic. | |
static TopicQuery | SelectAll (dds::sub::AnyDataReader reader) |
Creates a TopicQuery that requests all the samples in the DataWriters' cache. | |
Related Functions | |
(Note that these are not member functions.) | |
TopicQuery | find_topic_query (dds::sub::AnyDataReader datareader, const rti::core::Guid &guid) |
Looks up a TopicQuery by its GUID. | |
<<extension>> <<reference-type>> Allows a dds::sub::DataReader to query the sample cache of its matching dds::pub::DataWriters.
You can create a TopicQuery for a DataReader with the constructor that receives a TopicQuerySelection or with the following static member functions:
As a <<reference-type>>, a TopicQuery will be deleted when all references to it go out of scope or after calling close(). The middleware will notify the deletion of a TopicQuery to the DataWriters. See close() for more details.
|
inline |
Creates a TopicQuery for a given DataReader.
The resulting TopicQuery will propagate to the matching DataWriters right after creating if the reader is enabled. Otherwise it will propagate after enabling the reader.
Any late-joining DataWriter matching with the DataReader will also receive the query.
reader | The DataReader that will query and receive the requested samples |
selection | Selects which samples the matching DataWriters will provide. |
There are two special kinds of TopicQueries, created with the static member functions UseReaderContentFilter() and SelectAll().
|
inline |
Deletes and cancels this TopicQuery.
This is a explicit deletion, which otherwise would occur when all references to this TopicQuery go out of scope.
After deleting a TopicQuery new DataWriters won't discover it and existing DataWriters currently publishing cached samples may stop before delivering all of them.
|
inline |
Gets the TopicQuery GUID.
|
inline |
Indicates whether this TopicQuery has been closed with close().
|
inline |
Gets the DataReader associated to this TopicQuery.
|
static |
Creates a TopicQuery with the same filter as this reader's ContentFilteredTopic.
If the reader doesn't use a dds::topic::ContentFilteredTopic, this TopicQuery behaves as TopicQuery::SelectAll().
|
static |
Creates a TopicQuery that requests all the samples in the DataWriters' cache.
|
related |
Looks up a TopicQuery by its GUID.
datareader | The DataReader used to create the TopicQuery |
guid | The TopicQuery's GUID |