RTI Connext Traditional C++ API Version 7.2.0
|
A data sample and related info received from the middleware. More...
Inherits connext::details::SampleBase< T, I >.
Public Member Functions | |
Sample () | |
Creates a sample with default data and info values. More... | |
Sample (const Sample< T > &other) | |
Creates a sample making a deep copy of another sample. More... | |
Sample (SampleRef< T > sample_ref) | |
Creates a sample as a deep copy of the contents referenced by a WriteSampleRef. More... | |
SampleIdentity_t | identity () const |
Gets the identity of this sample. More... | |
SampleIdentity_t | related_identity () const |
Gets the identity of a sample that is related to this one. More... | |
T & | data () |
Gets the data this sample contains. More... | |
SampleInfo & | info () |
Gets the sample information. More... | |
const T & | data () |
Gets the data this sample contains. More... | |
const SampleInfo & | info () |
Gets the sample information. More... | |
A data sample and related info received from the middleware.
Samples contain data received from the middleware and information associated to the data.
T | The data type that this sample contains |
|
inline |
Creates a sample with default data and info values.
The data is deeply initialized using the corresponding TypeSupport
|
inline |
Creates a sample making a deep copy of another sample.
connext::Sample< T >::Sample | ( | SampleRef< T > | sample_ref | ) |
Creates a sample as a deep copy of the contents referenced by a WriteSampleRef.
|
inline |
Gets the identity of this sample.
The identity is assigned by the middleware upon reception.
References connext::Sample< T >::info().
|
inline |
Gets the identity of a sample that is related to this one.
When a connext::Requester receives a reply, the reply Sample contains the identity of the related request.
References connext::Sample< T >::info().
T & connext::Sample< T >::data | ( | ) |
Gets the data this sample contains.
SampleInfo & connext::Sample< T >::info | ( | ) |
Gets the sample information.
Referenced by connext::Sample< T >::identity(), and connext::Sample< T >::related_identity().
const T & connext::Sample< T >::data | ( | ) |
Gets the data this sample contains.
const SampleInfo & connext::Sample< T >::info | ( | ) |
Gets the sample information.