RTI Connext Modern C++ API
Version 7.0.0
|
<<value-type>> This class encapsulate the data and meta-data associated with DDS samples. More...
#include "dds/sub/Sample.hpp"
Public Member Functions | |
Sample ()=default | |
Create a sample. More... | |
Sample (const T &the_data, const SampleInfo &the_info) | |
Create a Sample with the provided data and SampleInfo. More... | |
Sample (const rti::sub::LoanedSample< T > &loaned_sample) | |
<<extension>> Construct a Sample from a LoanedSample More... | |
Sample (const Sample &other)=default | |
Copy constructor. More... | |
Sample & | operator= (const Sample &other)=default |
Copy assignment operator. More... | |
const DataType & | data () const |
Get the data of type T associated with this Sample. More... | |
void | data (const DataType &the_data) |
Set the data of type T associated with this Sample. More... | |
const SampleInfo & | info () const |
Get the SampleInfo associated with this Sample. More... | |
void | info (const SampleInfo &the_info) |
Set the SampleInfo associated with this Sample. More... | |
Sample & | operator= (const rti::sub::LoanedSample< T > &loaned_sample) |
<<extension>> Assignment operator from an rti::sub::LoanedSample More... | |
<<value-type>> This class encapsulate the data and meta-data associated with DDS samples.
The | type of the data that Sample represents |
|
default |
|
inline |
Create a Sample with the provided data and SampleInfo.
the_data | The data to create the Sample with |
the_info | The SampleInfo to create the Sample with |
|
inlineexplicit |
<<extension>> Construct a Sample from a LoanedSample
If loaned_sample.info()
.valid() is false, this sample's data value is default-constructed.
|
default |
Copy constructor.
|
default |
Copy assignment operator.
|
inline |
Get the data of type T associated with this Sample.
This function returns the current value of the data even if info().valid() is false.
Referenced by rti::sub::operator<<().
|
inline |
Set the data of type T associated with this Sample.
|
inline |
Get the SampleInfo associated with this Sample.
Referenced by rti::request::IsReplyRelatedPredicate< T >::operator()().
|
inline |
Set the SampleInfo associated with this Sample.
|
inline |
<<extension>> Assignment operator from an rti::sub::LoanedSample
This operator allows obtaining a copy of both the data and the info from a LoanedSample.