RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::sub::Sample< T > Class Template Reference

<<value-type>> This class encapsulate the data and meta-data associated with DDS samples. More...

#include "dds/sub/Sample.hpp"

Public Member Functions

 Sample ()
 Create a sample with invalid data.
 
 Sample (const T &the_data, const SampleInfo &the_info)
 Create a Sample with the provided data and SampleInfo.
 
 Sample (const rti::sub::LoanedSample< T > &sample_ref)
 <<extension>> Construct a Sample from a LoanedSample
 
 Sample (const Sample &other)
 Copy Constructor.
 
const DataType & data () const
 Get the data of type T associated with this Sample.
 
void data (const DataType &the_data)
 Set the data of type T associated with this Sample.
 
const SampleInfoinfo () const
 Get the SampleInfo associated with this Sample.
 
void info (const SampleInfo &the_info)
 Set the SampleInfo associated with this Sample.
 
Sampleoperator= (const rti::sub::LoanedSample< T > &sample_ref)
 <<extension>> Assignment operator from an rti::sub::LoanedSample
 

Detailed Description

template<typename T>
class dds::sub::Sample< T >

<<value-type>> This class encapsulate the data and meta-data associated with DDS samples.

Template Parameters
Thetype of the data that Sample represents

Constructor & Destructor Documentation

template<typename T >
dds::sub::Sample< T >::Sample ( )
inline

Create a sample with invalid data.

template<typename T >
dds::sub::Sample< T >::Sample ( const T &  the_data,
const SampleInfo the_info 
)
inline

Create a Sample with the provided data and SampleInfo.

Parameters
the_dataThe data to create the Sample with
the_infoThe SampleInfo to create the Sample with
template<typename T >
dds::sub::Sample< T >::Sample ( const rti::sub::LoanedSample< T > &  sample_ref)
inlineexplicit

<<extension>> Construct a Sample from a LoanedSample

template<typename T >
dds::sub::Sample< T >::Sample ( const Sample< T > &  other)
inline

Copy Constructor.

Member Function Documentation

template<typename T >
const DataType& dds::sub::Sample< T >::data ( ) const
inline

Get the data of type T associated with this Sample.

template<typename T >
void dds::sub::Sample< T >::data ( const DataType &  the_data)
inline

Set the data of type T associated with this Sample.

template<typename T >
const SampleInfo& dds::sub::Sample< T >::info ( ) const
inline

Get the SampleInfo associated with this Sample.

template<typename T >
void dds::sub::Sample< T >::info ( const SampleInfo the_info)
inline

Set the SampleInfo associated with this Sample.

template<typename T >
Sample& dds::sub::Sample< T >::operator= ( const rti::sub::LoanedSample< T > &  sample_ref)
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.


RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc