Face Engine SDK
4.6.0
A face detection, recognition and tracking engine.
|
Smart pointer for reference counted objects. More...
#include <Ref.h>
Public Member Functions | |
Ref () noexcept | |
Constructor. Initializes object pointer to nullptr. | |
Ref (std::nullptr_t) noexcept | |
Initializes object pointer to nullptr. | |
Ref (T *ptr) noexcept | |
Initializes object pointer with ptr and retains a reference. More... | |
Ref (const Ref &other) noexcept | |
Initializes object pointer with other and retains a reference. More... | |
~Ref () noexcept | |
Releases reference being held (if any). | |
T * | operator-> () const noexcept |
Access pointer. More... | |
T ** | getInitReference () noexcept |
Access pointer for initialization. More... | |
bool | operator== (const Ref &other) const noexcept |
Check if two refs are the same. More... | |
bool | operator!= (const Ref &other) const noexcept |
Check if two refs are not the same. More... | |
Ref & | operator= (const Ref &other) noexcept |
Assign a strong reference. More... | |
Ref & | operator= (T *ptr) noexcept |
Assign a raw pointer. More... | |
Ref & | operator= (std::nullptr_t) noexcept |
Assign a nullptr_t. More... | |
Ref & | assign (T *ptr) noexcept |
Assign an object. Presumes shared ownership, increases reference count. More... | |
Ref & | acquire (T *ptr) noexcept |
Acquire ownership of the object. More... | |
T * | reset () noexcept |
Reset reference counted object and assign nullptr to the pointer. | |
template<typename S > | |
Ref< S > | as () const noexcept |
Make smart reference with relative type. More... | |
Public Member Functions inherited from fsdk::RefBase< T > | |
RefBase () noexcept | |
Initializes object pointer to nullptr. | |
RefBase (T *ptr) noexcept | |
Initializes object pointer with ptr. More... | |
operator T * () const noexcept | |
Get raw object pointer. More... | |
T & | operator* () const noexcept |
Dereference operator. More... | |
operator bool () const noexcept | |
Implicit cast to bool. More... | |
bool | operator== (const RefBase &other) const noexcept |
Check if two refs are the same. More... | |
bool | operator!= (const RefBase &other) const noexcept |
Check if two refs are not the same. More... | |
bool | isNull () const noexcept |
Check for nullptr. More... | |
bool | isExpired () const noexcept |
Check is object is dead. More... | |
bool | isUnique () const noexcept |
Check if object has only one strong reference. More... | |
T * | get () const noexcept |
Get current raw object pointer. More... | |
void | set (T *ptr) noexcept |
Replace object pointer without any checks or reference management. More... | |
Additional Inherited Members | |
Protected Attributes inherited from fsdk::RefBase< T > | |
T * | m_ptr |
Raw pointer. | |
Smart pointer for reference counted objects.
Automatically calls retain/release and provides safety assertions.
T | object interface (must be derived from IRefCounted) |
Initializes object pointer with ptr and retains a reference.
[in] | ptr | raw pointer to initialize with. |
Initializes object pointer with other and retains a reference.
[in] | other | pointer to initialize with. |
Acquire ownership of the object.
[in] | ptr | raw object pointer to acquire. |
Make smart reference with relative type.
S | target interface (must be relative to T) |
Assign an object. Presumes shared ownership, increases reference count.
[in] | ptr | raw object pointer to assign. |
|
inlinenoexcept |
Access pointer for initialization.
Check if two refs are not the same.
[in] | other | ref to check against. |
|
inlinenoexcept |
Access pointer.
Assign a strong reference.
[in] | other | strong reference. |
Assign a raw pointer.
[in] | ptr | raw pointer. |
Assign a nullptr_t.
Check if two refs are the same.
[in] | other | ref to check against. |