RTI Connext Modern C++ API  Version 5.2.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 &data, const SampleInfo &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 &  data,
const SampleInfo info 
)
inline

Create a Sample with the provided data and SampleInfo.

Parameters
dataThe data to create the Sample with
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.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc