<<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>
<<extension>> <<reference-type>> Allows a dds::sub::DataReader to query the sample cache of its matching dds::pub::DataWriters.
- Note
- A TopicQuery provides all the functions of a <<reference-type>>, including close() and retain().
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.
◆ TopicQuery()
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.
- Parameters
-
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().
◆ close()
void rti::sub::TopicQuery::close |
( |
| ) |
|
|
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.
◆ guid()
◆ closed()
bool rti::sub::TopicQuery::closed |
( |
| ) |
const |
|
inline |
◆ datareader()
Gets the DataReader associated to this TopicQuery.
◆ UseReaderContentFilter()
◆ SelectAll()
Creates a TopicQuery that requests all the samples in the DataWriters' cache.
◆ find_topic_query()