![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
The WeakReference class enables you to maintain a weak reference to a DDS reference type. More...
#include "WeakReference.hpp"
Public Types | |
| typedef T | ReferenceType |
Public Member Functions | |
| WeakReference () | |
| WeakReference (const T &t) | |
| bool | expired () |
| T | lock () |
The WeakReference class enables you to maintain a weak reference to a DDS reference type.
The existence of a weak link will not prevent the garbage collection of the reference type.
Definition at line 29 of file WeakReference.hpp.
| typedef T dds::core::WeakReference< T >::ReferenceType |
Definition at line 44 of file WeakReference.hpp.
| dds::core::WeakReference< T >::WeakReference | ( | ) |
Creates a weak reference without an referenced dds object.
Definition at line 42 of file WeakReferenceImpl.hpp.
| dds::core::WeakReference< T >::WeakReference | ( | const T & | t | ) |
Creates a weak reference for the reference type passed as argument.
| t | dds object the new weak reference will refer to |
Definition at line 45 of file WeakReferenceImpl.hpp.
| bool dds::core::WeakReference< T >::expired | ( | ) |
Checks whether the underlying reference has been deleted.
Definition at line 57 of file WeakReferenceImpl.hpp.
| T dds::core::WeakReference< T >::lock | ( | ) |
Gives access to the underlying shared reference.
If the reference has expired the returned object will be referencing 'dds::core::null'.
Definition at line 63 of file WeakReferenceImpl.hpp.