![]() |
ChimeraTK-cppext 01.07.01
|
shared_ptr-like smart pointer type for referencing the shared_state. More...
#include <future_queue.hpp>
Public Member Functions | |
| shared_state_ptr () | |
| Default constructor: create empty pointer. | |
| shared_state_ptr (const shared_state_ptr &other) | |
| Copy constructor. | |
| shared_state_ptr & | operator= (const shared_state_ptr &other) |
| Copy by assignment. | |
| ~shared_state_ptr () | |
| Destructor. | |
| template<typename T > | |
| void | make_new (size_t length) |
| Create new shared_state for type T. | |
| shared_state_base * | operator-> () |
| Dereferencing operator. | |
| const shared_state_base * | operator-> () const |
| template<typename T > | |
| shared_state< T > * | cast () |
| Cast into shared state for type T. | |
| operator bool () const | |
| Check if pointer is initialised. | |
| bool | operator== (const shared_state_ptr &other) const |
| Check if two pointers are identical. | |
| shared_state_base * | get () const |
| Obtain the target pointer. | |
| void | set (shared_state_base *ptr_) |
| Set the target pointer without incrementing the reference counter. | |
shared_ptr-like smart pointer type for referencing the shared_state.
This is required (instead or in addition to using a shared_ptr), since in case of a async continuation the internal thread always holds a reference to the shared_state but should be destroyed when the last reference (outside the internal thread) gets destroyed.
Definition at line 47 of file future_queue.hpp.
|
inline |
Default constructor: create empty pointer.
Definition at line 673 of file future_queue.hpp.
|
inline |
Copy constructor.
Definition at line 675 of file future_queue.hpp.
|
inline |
Destructor.
Definition at line 689 of file future_queue.hpp.
| shared_state< T > * cppext::detail::shared_state_ptr::cast | ( | ) |
Cast into shared state for type T.
Definition at line 730 of file future_queue.hpp.
|
inline |
Obtain the target pointer.
Definition at line 693 of file future_queue.hpp.
Create new shared_state for type T.
Definition at line 713 of file future_queue.hpp.
|
inline |
Check if pointer is initialised.
Definition at line 735 of file future_queue.hpp.
|
inline |
Dereferencing operator.
Definition at line 719 of file future_queue.hpp.
|
inline |
Definition at line 724 of file future_queue.hpp.
|
inline |
Copy by assignment.
Definition at line 681 of file future_queue.hpp.
|
inline |
Check if two pointers are identical.
Definition at line 739 of file future_queue.hpp.
|
inline |
Set the target pointer without incrementing the reference counter.
Definition at line 697 of file future_queue.hpp.