OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::sub::SharedSamples< T > Class Template Reference

This class encapsulates and automates the management of loaned samples. More...

#include "SharedSamples.hpp"

Public Types

typedef DELEGATE< T >::const_iterator const_iterator
 
typedef T DataType
 
typedef dds::core::smart_ptr_traits::ref_type DELEGATE_REF_T
 

Public Member Functions

 SharedSamples ()
 
 SharedSamples (dds::sub::LoanedSamples< T > ls)
 
 SharedSamples (const SharedSamples &other)
 
 ~SharedSamples ()
 
const_iterator begin () const
 
const DELEGATE_REF_Tdelegate () const
 
DELEGATE_REF_Tdelegate ()
 
const_iterator end () const
 
uint32_t length () const
 

Detailed Description

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

This class encapsulates and automates the management of loaned samples.

Note
The specification of this class is not yet finished. It will possibly change in the future. Anyway, this class is basically a copy of LoanedSamples when considering its functionality. So, anything you would want to do with this class can also be done by the LoanedSamples.

Definition at line 49 of file SharedSamples.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef DELEGATE<T>::const_iterator dds::sub::SharedSamples< T >::const_iterator

Definition at line 53 of file SharedSamples.hpp.

◆ DataType

template<typename T>
typedef T dds::sub::SharedSamples< T >::DataType

Definition at line 52 of file SharedSamples.hpp.

◆ DELEGATE_REF_T

template<typename T>
typedef dds::core::smart_ptr_traits::ref_type dds::sub::SharedSamples< T >::DELEGATE_REF_T

Definition at line 55 of file SharedSamples.hpp.

Constructor & Destructor Documentation

◆ SharedSamples() [1/3]

template<typename T >
dds::sub::SharedSamples< T >::SharedSamples ( )

Constructs a SharedSamples instance.

Definition at line 40 of file SharedSamplesImpl.hpp.

◆ SharedSamples() [2/3]

template<typename T>
dds::sub::SharedSamples< T >::SharedSamples ( dds::sub::LoanedSamples< T >  ls)

Constructs an instance of SharedSamples and removes the ownership of the loan from the LoanedSamples. As a result the destruction of the LoanedSamples object will have no effect on loaned data. Loaned data will be returned automatically once the delegate of this reference type will have a zero reference count.

Parameters
lsthe loaned samples

Definition at line 43 of file SharedSamplesImpl.hpp.

◆ SharedSamples() [3/3]

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

Copies a SharedSamples instance.

Definition at line 49 of file SharedSamplesImpl.hpp.

◆ ~SharedSamples()

template<typename T >
dds::sub::SharedSamples< T >::~SharedSamples ( )

Definition at line 46 of file SharedSamplesImpl.hpp.

Member Function Documentation

◆ begin()

template<typename T >
SharedSamples< T >::const_iterator dds::sub::SharedSamples< T >::begin ( ) const

Gets an iterator pointing to the beginning of the samples.

Returns
an iterator pointing to the beginning of the samples

Definition at line 55 of file SharedSamplesImpl.hpp.

◆ delegate() [1/2]

template<typename T >
const SharedSamples< T >::DELEGATE_REF_T & dds::sub::SharedSamples< T >::delegate ( ) const

Gets the delegate.

Returns
the delegate

Definition at line 67 of file SharedSamplesImpl.hpp.

◆ delegate() [2/2]

template<typename T >
SharedSamples< T >::DELEGATE_REF_T & dds::sub::SharedSamples< T >::delegate ( )

Gets the delegate.

Returns
the delegate

Definition at line 73 of file SharedSamplesImpl.hpp.

◆ end()

template<typename T >
SharedSamples< T >::const_iterator dds::sub::SharedSamples< T >::end ( ) const

Gets an iterator pointing to the beginning of the samples.

Returns
an iterator pointing to the beginning of the samples

Definition at line 61 of file SharedSamplesImpl.hpp.

◆ length()

template<typename T >
uint32_t dds::sub::SharedSamples< T >::length ( ) const

Returns the number of samples.

Returns
the number of samples

Definition at line 79 of file SharedSamplesImpl.hpp.


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