System::WeakPtr class
WeakPtr class
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this class doesn’t guarantee that its instance will always remain in weak mode as set_Mode() is still accessible. This type is a pointer to manage other object’s deletion. It should be allocated on stack and passed to functions either by value or by const reference.
template<class T>class WeakPtr : public System::SmartPtr<T>
| Parameter | Description |
|---|
| T | Pointee type. |
Methods
| Method | Description |
|---|
| expired() const | Checks if referenced object was already deleted. |
| get_weak() const | Gets referenced object. Asserts that pointer is in weak mode. |
| operator=(Q&&) | Assigns value to weak pointer. Calls into specific assignment operator of SmartPtr_. |
| operator==(std::nullptr_t) const | Checks if weak pointer is null. |
| WeakPtr(std::nullptr_t) | Creates null pointer. |
| WeakPtr(Pointee_ *) | Creates weak pointer to given object. |
| WeakPtr(const SmartPtr_&) | Creates weak pointer referencing same pointer ptr points to. |
| WeakPtr(const SmartPtr<Q>&) | Creates weak pointer referencing same pointer x points to. |
| WeakPtr(const WeakPtr_&) | Copy-constructs weak pointer. |
| WeakPtr(const WeakPtr<Q>&) | Copy-constructs weak pointer. |
| WeakPtr(SmartPtr_&&) | Move-constructs weak pointer. |
Typedefs
See Also