RTI Connext Modern C++ API Version 7.3.0
rti::request::IsReplyRelatedPredicate< T > Class Template Reference

Functor to match replies by their related request. More...

#include <util.hpp>

Public Member Functions

 IsReplyRelatedPredicate (const rti::core::SampleIdentity &related_request_id)
 Creates the predicate with the request id to match. More...
 
bool operator() (dds::sub::Sample< T > sample)
 Determines if a reply is related to the request id this object contains. More...
 
bool operator() (rti::sub::LoanedSample< T > sample)
 Determines if a reply is related to the request id this object contains. More...
 
bool operator() (dds::sub::SampleInfo sample_info)
 Determines if a reply info is related to the request id this object contains. More...
 

Detailed Description

template<typename T>
class rti::request::IsReplyRelatedPredicate< T >

Functor to match replies by their related request.

Useful for C++ standard algorithms like std::find_if()

See also
Correlating requests and replies

Constructor & Destructor Documentation

◆ IsReplyRelatedPredicate()

template<typename T >
rti::request::IsReplyRelatedPredicate< T >::IsReplyRelatedPredicate ( const rti::core::SampleIdentity related_request_id)
inline

Creates the predicate with the request id to match.

Member Function Documentation

◆ operator()() [1/3]

template<typename T >
bool rti::request::IsReplyRelatedPredicate< T >::operator() ( dds::sub::Sample< T >  sample)
inline

Determines if a reply is related to the request id this object contains.

References dds::sub::Sample< T >::info(), and dds::sub::SampleInfo::related_original_publication_virtual_sample_identity().

◆ operator()() [2/3]

template<typename T >
bool rti::request::IsReplyRelatedPredicate< T >::operator() ( rti::sub::LoanedSample< T >  sample)
inline

Determines if a reply is related to the request id this object contains.

References rti::sub::LoanedSample< T >::info(), and dds::sub::SampleInfo::related_original_publication_virtual_sample_identity().

◆ operator()() [3/3]

template<typename T >
bool rti::request::IsReplyRelatedPredicate< T >::operator() ( dds::sub::SampleInfo  sample_info)
inline

Determines if a reply info is related to the request id this object contains.

References dds::sub::SampleInfo::related_original_publication_virtual_sample_identity().