|
| RefBase () noexcept=default |
| Initializes object pointer to nullptr.
|
|
| RefBase (T *ptr) noexcept |
| Initializes object pointer with ptr.
|
|
| operator T* () const noexcept |
| Get raw object pointer.
|
|
T & | operator* () const noexcept |
| Dereference operator.
|
|
| operator bool () const noexcept |
| Implicit cast to bool.
|
|
bool | operator== (const RefBase &other) const noexcept |
| Check if two refs are the same.
|
|
bool | operator!= (const RefBase &other) const noexcept |
| Check if two refs are not the same.
|
|
bool | isNull () const noexcept |
| Check for nullptr.
|
|
bool | isExpired () const noexcept |
| Check is object is dead.
|
|
bool | isUnique () const noexcept |
| Check if object has only one strong reference.
|
|
T * | get () const noexcept |
| Get current raw object pointer.
|
|
void | set (T *ptr) noexcept |
| Replace object pointer without any checks or reference management.
|
|
template<typename T>
struct fsdk::RefBase< T >
Generic base class of a pointer for reference counted objects.
Implements common features of Ref and WeakRef and is not meant to be used directly.
- Note
- This is to eliminate code duplication and should not be used directly.
- Template Parameters
-