CoreDX DDS C++ Reference Manual
Public Types | Public Member Functions | List of all members
DDS::SharedSamples< T > Class Template Reference

Holds a reference to a collection of sample data and related meta-data. More...

Public Types

typedef SampleIterator< T, false > iterator
 
typedef SampleIterator< T, true > const_iterator
 
typedef dds_type_traits< T >::SampleIteratorValueType value_type
 
typedef dds_type_traits< T >::ConstSampleIteratorValueType const_value_type
 
typedef std::ptrdiff_t difference_type
 

Public Member Functions

 SharedSamples ()
 Default constructor.
 
 SharedSamples (const SharedSamples &)
 Copy constructor.
 
 ~SharedSamples () throw ()
 Destructor.
 
SharedSamplesoperator= (const SharedSamples &)
 Assignment operator.
 
Seq & data_seq ()
 Access the contained data sequence.
 
DDS::SampleInfoSeqinfo_seq ()
 Access the contained sample info sequence.
 
const Seq & data_seq () const
 Access the contained data sequence as const.
 
const DDS::SampleInfoSeqinfo_seq () const
 Access the contained sample info sequence as const.
 
value_type operator[] (size_t index)
 Access a specific element of the data sequence The returned value will be of type SampleRef<T>
 
const_value_type operator[] (size_t index) const
 Access a specific element of the data sequence as const The returned value will be of type SampleRef<const T>
 
int length () const
 Access the length of the contained data sequence.
 
void swap (SharedSamples &that) throw ()
 Swap the contents of this with 'that'.
 
iterator begin ()
 Obtain an iterator that refers to the beginning of the contained sequences.
 
iterator end ()
 Obtain an iterator that refers to the end of the contained sequences.
 
const_iterator begin () const
 Obtain a const iterator that refers to the beginning of the contained sequences.
 
const_iterator end () const
 Obtain a const iterator that refers to the end of the contained sequences.
 

Detailed Description

template<typename T>
class DDS::SharedSamples< T >

Holds a reference to a collection of sample data and related meta-data.

This object provides a counted reference to the data, ensuring that while it exists, the data will continue to be valid. When the last SharedSamples instance is destroyed [the last reference is removed], then the original loan is ultimately returned as required.

Member Typedef Documentation

template<typename T>
typedef SampleIterator<T, true> DDS::SharedSamples< T >::const_iterator

const_iterator typedef

template<typename T>
typedef dds_type_traits<T>::ConstSampleIteratorValueType DDS::SharedSamples< T >::const_value_type

const_value_type typedef. Is SampleRef<const T>

template<typename T>
typedef std::ptrdiff_t DDS::SharedSamples< T >::difference_type

difference_type typedef

template<typename T>
typedef SampleIterator<T, false> DDS::SharedSamples< T >::iterator

iterator typedef

template<typename T>
typedef dds_type_traits<T>::SampleIteratorValueType DDS::SharedSamples< T >::value_type

value_type typedef. Is SampleRef<T>


© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.