|
using | element_type = typename std::pointer_traits< PtrType >::element_type |
|
using | pointer = element_type * |
|
|
| foreign_ptr () noexcept(std::is_nothrow_default_constructible_v< PtrType >) |
| Constructs a null foreign_ptr<> .
|
|
| foreign_ptr (std::nullptr_t) noexcept(std::is_nothrow_default_constructible_v< foreign_ptr >) |
| Constructs a null foreign_ptr<> .
|
|
| foreign_ptr (PtrType value) noexcept(std::is_nothrow_move_constructible_v< PtrType >) |
| Wraps a pointer object and remembers the current core.
|
|
| foreign_ptr (const foreign_ptr &)=delete |
|
| foreign_ptr (foreign_ptr &&other) noexcept(std::is_nothrow_move_constructible_v< PtrType >)=default |
| Moves a foreign_ptr<> to another object.
|
|
| ~foreign_ptr () |
| Destroys the wrapped object on its original cpu.
|
|
future< foreign_ptr > | copy () const noexcept |
| Creates a copy of this foreign ptr. Only works if the stored ptr is copyable.
|
|
element_type & | operator* () const noexcept(noexcept(*_value)) |
| Accesses the wrapped object.
|
|
element_type * | operator-> () const noexcept(noexcept(&*_value)) |
| Accesses the wrapped object.
|
|
pointer | get () const noexcept(noexcept(&*_value)) |
| Access the raw pointer to the wrapped object.
|
|
unsigned | get_owner_shard () const noexcept |
|
| operator bool () const noexcept(noexcept(static_cast< bool >(_value))) |
| Checks whether the wrapped pointer is non-null.
|
|
foreign_ptr & | operator= (foreign_ptr &&other) noexcept(std::is_nothrow_move_constructible_v< PtrType >) |
| Move-assigns a foreign_ptr<> .
|
|
PtrType | release () noexcept(std::is_nothrow_default_constructible_v< PtrType >) |
|
void | reset (PtrType new_ptr) noexcept(std::is_nothrow_move_constructible_v< PtrType >) |
|
void | reset (std::nullptr_t=nullptr) noexcept(std::is_nothrow_default_constructible_v< PtrType >) |
|
future | destroy () noexcept |
|
◆ destroy()
template<typename PtrType >
Destroy the managed pointer.
- Returns
- a future that is resolved when managed pointer is destroyed on its owner shard.
◆ get_owner_shard()
template<typename PtrType >
Return the owner-shard of this pointer.
The owner shard of the pointer can change as a result of move-assigment or a call to reset().
◆ release()
template<typename PtrType >
Releases the owned pointer
Warning: the caller is now responsible for destroying the pointer on its owner shard. This method is best called on the owner shard to avoid accidents.
◆ reset() [1/2]
template<typename PtrType >
Replace the managed pointer with new_ptr.
The previous managed pointer is destroyed on its owner shard.
◆ reset() [2/2]
template<typename PtrType >
Replace the managed pointer with a null value.
The previous managed pointer is destroyed on its owner shard.
The documentation for this class was generated from the following file: