Cyclone ISO C++ API Reference Guide
dds::topic::TopicInstance< T > Class Template Reference

A TopicInstance encapsulates a dds::sub::Sample and its associated dds::core::InstanceHandle. More...

#include "TopicInstance.hpp"

Public Member Functions

 TopicInstance ()
 
 TopicInstance (const ::dds::core::InstanceHandle &h)
 
 TopicInstance (const ::dds::core::InstanceHandle &h, const T &sample)
 
const ::dds::core::InstanceHandle handle () const
 
void handle (const ::dds::core::InstanceHandle &h)
 
 operator const ::dds::core::InstanceHandle () const
 
T & sample ()
 
const T & sample () const
 
void sample (const T &sample)
 

Detailed Description

template<typename T>
class dds::topic::TopicInstance< T >

A TopicInstance encapsulates a dds::sub::Sample and its associated dds::core::InstanceHandle.

See also
Topic Definition
dds::sub::Sample
dds::core::InstanceHandle

Definition at line 30 of file TopicInstance.hpp.

Constructor & Destructor Documentation

◆ TopicInstance() [1/3]

template<typename T>
dds::topic::TopicInstance< T >::TopicInstance ( )

Construct a TopicInstance.

◆ TopicInstance() [2/3]

template<typename T>
dds::topic::TopicInstance< T >::TopicInstance ( const ::dds::core::InstanceHandle h)
explicit

Construct a TopicInstance with an InstanceHandle.

Parameters
hthe InstanceHandle

◆ TopicInstance() [3/3]

template<typename T>
dds::topic::TopicInstance< T >::TopicInstance ( const ::dds::core::InstanceHandle h,
const T &  sample 
)

Construct a TopicInstance with an InstanceHandle and a sample type.

Parameters
hthe InstanceHandle
samplethe <Type>

Member Function Documentation

◆ handle() [1/2]

template<typename T>
const ::dds::core::InstanceHandle dds::topic::TopicInstance< T >::handle ( ) const

Get the InstanceHandle.

Returns
the InstanceHandle for the TopicInstance

◆ handle() [2/2]

template<typename T>
void dds::topic::TopicInstance< T >::handle ( const ::dds::core::InstanceHandle h)

Set the InstanceHandle.

Parameters
hthe InstanceHandle to set to the TopicInstance

◆ operator const ::dds::core::InstanceHandle()

template<typename T>
dds::topic::TopicInstance< T >::operator const ::dds::core::InstanceHandle ( ) const

Conversion operator to get the InstanceHandle.

Returns
the InstanceHandle for the TopicInstance

◆ sample() [1/3]

template<typename T>
T& dds::topic::TopicInstance< T >::sample ( )

Get the data sample

Returns
the sample for the TopicInstance

◆ sample() [2/3]

template<typename T>
const T& dds::topic::TopicInstance< T >::sample ( ) const

Get the data sample

Returns
the sample for the TopicInstance

◆ sample() [3/3]

template<typename T>
void dds::topic::TopicInstance< T >::sample ( const T &  sample)

Set the data sample

Parameters
samplesend a sample for this TopicInstance

The documentation for this class was generated from the following file: