The Sparta Modeling Framework
|
Like in STL, create a weak pointer to a SpartaSharedPointer. More...
#include <SpartaSharedPointer.hpp>
Public Member Functions | |
constexpr | SpartaWeakPointer () noexcept=default |
Create an empty, expired weakpointer. | |
SpartaWeakPointer (const sparta::SpartaSharedPointer< PointerT > &sp) noexcept | |
Construct a SpartaWeakPointer with the given SpartaSharedPointer. | |
~SpartaWeakPointer () | |
Destroy (and detach) from a SpartaSharedPointer. | |
SpartaWeakPointer (const SpartaWeakPointer &orig) | |
Create a copy of the SpartaWeakPointer. | |
SpartaWeakPointer (SpartaWeakPointer &&orig) | |
Move a SpartaWeakPointer. | |
SpartaWeakPointer & | operator= (const SpartaWeakPointer &orig) |
Assign a SpartaWeakPointer from another. | |
SpartaWeakPointer & | operator= (SpartaWeakPointer &&orig) |
Move assign a SpartaWeakPointer from another. | |
long | use_count () const noexcept |
The use count of the SpartaSharedPointer. Will be 0 if none left. | |
bool | expired () const noexcept |
Has the SpartaSharedPointer that this weak pointer points to expired? | |
SpartaSharedPointer< PointerT > | lock () const noexcept |
Lock and return a SpartaSharedPointer this SpartaWeakPointer points to. | |
Like in STL, create a weak pointer to a SpartaSharedPointer.
Works like the original, just tons faster
Definition at line 407 of file SpartaSharedPointer.hpp.
|
inlinenoexcept |
Construct a SpartaWeakPointer with the given SpartaSharedPointer.
sp | Pointer to the SpartaSharedPointer to "watch" |
Definition at line 417 of file SpartaSharedPointer.hpp.
|
inline |
Destroy (and detach) from a SpartaSharedPointer.
Definition at line 426 of file SpartaSharedPointer.hpp.
|
inline |
Create a copy of the SpartaWeakPointer.
orig | The original to copy. Both are valid |
Definition at line 438 of file SpartaSharedPointer.hpp.
|
inline |
Move a SpartaWeakPointer.
orig | The original to move. The original is invalidated |
Definition at line 450 of file SpartaSharedPointer.hpp.
|
inlinenoexcept |
Has the SpartaSharedPointer that this weak pointer points to expired?
Definition at line 505 of file SpartaSharedPointer.hpp.
|
inlinenoexcept |
Lock and return a SpartaSharedPointer this SpartaWeakPointer points to.
Definition at line 516 of file SpartaSharedPointer.hpp.
|
inline |
Assign a SpartaWeakPointer from another.
orig | The original to copy. The original is valid |
Definition at line 460 of file SpartaSharedPointer.hpp.
|
inline |
Move assign a SpartaWeakPointer from another.
orig | The original to move. The original is invalidated |
Definition at line 478 of file SpartaSharedPointer.hpp.
|
inlinenoexcept |
The use count of the SpartaSharedPointer. Will be 0 if none left.
Definition at line 494 of file SpartaSharedPointer.hpp.