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

Encapsulates a sample and its associated instance handle. More...

#include <TopicInstance.hpp>

Public Member Functions

 TopicInstance ()
 Create a null TopicInstance.
 
 TopicInstance (const ::dds::core::InstanceHandle &the_handle)
 Create a TopicInstance with an InstanceHandle.
 
 TopicInstance (const ::dds::core::InstanceHandle &the_handle, const T &the_sample)
 Create a TopicInstance with a data sample and an InstanceHandle.
 
 operator dds::core::InstanceHandle () const
 Obtains the InstanceHandle.
 
dds::core::InstanceHandle handle () const
 Obtains the InstahnceHandle.
 
void handle (const ::dds::core::InstanceHandle &the_handle)
 Sets the InstanceHandle.
 
const T & sample () const
 Gets the sample by const reference.
 
T & sample ()
 Gets the sample by reference.
 
void sample (const T &the_sample)
 Assigns the data sample.
 

Detailed Description

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

Encapsulates a sample and its associated instance handle.

Template Parameters
Thetype of the sample that the TopicInstance is encapsulating.
See Also
dds::pub::DataWriter::write(const dds::topic::TopicInstance<T>&)

Constructor & Destructor Documentation

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

Create a null TopicInstance.

The sample is default constructed and the instance handle is equal to dds::core::null.

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

Create a TopicInstance with an InstanceHandle.

The sample is default constructed and the instance handle is copied from handle.

template<typename T >
dds::topic::TopicInstance< T >::TopicInstance ( const ::dds::core::InstanceHandle the_handle,
const T &  the_sample 
)
inline

Create a TopicInstance with a data sample and an InstanceHandle.

Member Function Documentation

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

Obtains the InstanceHandle.

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

Obtains the InstahnceHandle.

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

Sets the InstanceHandle.

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

Gets the sample by const reference.

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

Gets the sample by reference.

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

Assigns the data sample.

Parameters
the_sampleThe data sample to copy into this TopicInstance

RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc