aui::Arc#
An std::shared_ptr with AUI extensions.
| Header: | #include <AUI/Common/SharedPtrTypes.h> |
| CMake: | aui_link(my_target PUBLIC aui::core) |
Detailed Description#
Note
Of course, it is not good tone to define a class with _ type but it significantly increases coding speed. Instead of writing every time std::shared_ptr you should write only the _ symbol.
Arc stands for atomic reference counter
Public Methods#
constructor#
Constructs a shared_ptr which shares ownership of the object managed by v.
Constructs a shared_ptr which shares ownership of the object managed by v. If v manages no object, *this
manages no object either.
Move-constructs a shared_ptr from v.
After the construction, *this contains a copy of the previous state of v, v is empty and its stored pointer
is null.
In comparison to copy-constructing, the move-constructor is cheaper, as it does not require an atomic operation.
Constructs a shared_ptr which shares ownership of the object managed by v.
Constructs a shared_ptr which shares ownership of the object managed by v. If v manages no object, *this
manages no object either.
Move-constructs a shared_ptr from v.
After the construction, *this contains a copy of the previous state of v, v is empty and its stored pointer
is null.
In comparison to copy-constructing, the move-constructor is cheaper, as it does not require an atomic operation.
Constructs a shared_ptr which shares ownership of the object managed by v.
Throws std::bad_weak_ptr if expired.
Constructs a shared_ptr which shares ownership of the object managed by v.
Throws std::bad_weak_ptr if expired.