CoreDX DDS Modern C++ API
Public Member Functions | List of all members
dds::sub::SharedSamples< T, DELEGATE > Class Template Reference

The class SharedSamples is used as a container safe and sharable version of the LoanedSamples class. More...

Inheritance diagram for dds::sub::SharedSamples< T, DELEGATE >:
Inheritance graph
[legend]
Collaboration diagram for dds::sub::SharedSamples< T, DELEGATE >:
Collaboration graph
[legend]

Public Member Functions

 SharedSamples (LoanedSamples ls)
 Constructs an instance of SharedSamples and removes the ownership of the loan from the LoanedSamples. More...
 
- Public Member Functions inherited from dds::core::Reference< DELEGATE< T > >
 Reference (dds::core::null_type &)
 Creates a "null" reference.
 
 Reference (const Reference &ref)
 Creates a reference from another. More...
 
 Reference (const Reference< D > &ref)
 Enables safe assignment from other reference types. More...
 
 Reference (DELEGATE_T *p)
 The following two constructors create a dds Reference from a vendor specific delegate. More...
 
 ~Reference ()
 Destroys a reference.
 
bool operator== (const R &ref) const
 Compares two reference objects and returns true if they are equal. More...
 
bool operator== (const null_type) const
 Special operator== used to check if this reference object equals the null reference. More...
 
bool operator!= (const R &ref) const
 Compares two reference objects and returns true if they are not-equal. More...
 
bool operator!= (const null_type nil) const
 Special operator!= used to check if this reference object does not equals the null reference. More...
 
Referenceoperator= (const null_type)
 Special assignment operators that takes care of assigning null to this reference. More...
 
bool is_nil () const
 Returns true if this reference object is nil, meaning pointing to null.
 
const DELEGATE_REF_T & delegate () const
 Returns a reference to the underlying delegate. More...
 
DELEGATE_REF_T & delegate ()
 Returns a reference to the underlying delegate. More...
 
DELEGATE< T > * operator-> ()
 The operator->() is provided to be able to directly invoke methods on the delegate. More...
 
const DELEGATE< T > * operator-> () const
 The operator->() is provided to be able to directly invoke methods on the delegate. More...
 

Detailed Description

template<typename T, template< typename Q > class DELEGATE>
class dds::sub::SharedSamples< T, DELEGATE >

The class SharedSamples is used as a container safe and sharable version of the LoanedSamples class.

Constructor & Destructor Documentation

◆ SharedSamples()

template<typename T , template< typename Q > class DELEGATE>
dds::sub::SharedSamples< T, DELEGATE >::SharedSamples ( LoanedSamples  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 or the explicit invocation of its method return_loan 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.

© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.