mCRL2
|
A reference counted reference to a shared_reference_counted object. More...
#include <shared_reference.h>
Public Member Functions | |
shared_reference () noexcept | |
The default constructor. | |
shared_reference (T *reference) noexcept | |
Takes ownership of the passed reference, which means that its reference count is incremented. | |
shared_reference (const shared_reference< T > &other) noexcept | |
Copy constructor. | |
shared_reference (shared_reference< T > &&other) noexcept | |
Move constructor. | |
~shared_reference () | |
shared_reference< T > & | operator= (const shared_reference< T > &other) noexcept |
Copy assignment constructor. | |
shared_reference< T > & | operator= (shared_reference< T > &&other) noexcept |
Move assignment constructor. | |
bool | defined () const |
Check whether the shared_reference has a valid reference. | |
bool | operator== (const shared_reference< T > &other) const noexcept |
bool | operator< (const shared_reference< T > &other) const noexcept |
bool | operator!= (const shared_reference< T > &other) const noexcept |
bool | operator<= (const shared_reference< T > &other) const noexcept |
bool | operator> (const shared_reference< T > &other) const noexcept |
bool | operator>= (const shared_reference &other) const noexcept |
T * | operator-> () const noexcept |
T * | get () const noexcept |
T & | operator* () const noexcept |
void | swap (shared_reference< T > &other) |
Swaps *this with the other shared reference. | |
bool | tagged () const noexcept |
void | tag () const |
void | untag () const |
Private Attributes | |
utilities::tagged_pointer< T > | m_reference |
A reference counted reference to a shared_reference_counted object.
Similar to a shared_ptr except that reference counts are only atomic when thread safety is desired and that it stores the reference count in the inherited object.
Definition at line 102 of file shared_reference.h.
|
inlinenoexcept |
The default constructor.
Definition at line 107 of file shared_reference.h.
|
inlinenoexcept |
Takes ownership of the passed reference, which means that its reference count is incremented.
Definition at line 113 of file shared_reference.h.
|
inlinenoexcept |
Copy constructor.
Definition at line 121 of file shared_reference.h.
|
inlinenoexcept |
Move constructor.
Definition at line 131 of file shared_reference.h.
|
inline |
Definition at line 137 of file shared_reference.h.
|
inline |
Check whether the shared_reference has a valid reference.
Definition at line 178 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 220 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 194 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 226 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 214 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 188 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 199 of file shared_reference.h.
|
inlinenoexcept |
Copy assignment constructor.
Definition at line 146 of file shared_reference.h.
|
inlinenoexcept |
Move assignment constructor.
Definition at line 165 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 183 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 204 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 209 of file shared_reference.h.
|
inline |
Swaps *this with the other shared reference.
Definition at line 233 of file shared_reference.h.
|
inline |
Definition at line 243 of file shared_reference.h.
|
inlinenoexcept |
Definition at line 238 of file shared_reference.h.
|
inline |
Definition at line 248 of file shared_reference.h.
|
mutableprivate |
Definition at line 254 of file shared_reference.h.