Face Engine SDK
5.23.1
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. | |
Ref (const Ref &other) | |
Initializes object pointer with other and retains a reference. | |
template<class D , typename = typename std::enable_if<std::is_convertible<D*, T*>::value>::type> | |
Ref (const Ref< D > &other) | |
Initializes object pointer with other and retains a reference. | |
~Ref () noexcept | |
Releases reference being held (if any). | |
T * | operator-> () const noexcept |
Access pointer. | |
T ** | getInitReference () noexcept |
Access pointer for initialization. | |
bool | operator== (const Ref &other) const noexcept |
Check if two refs are the same. | |
bool | operator!= (const Ref &other) const noexcept |
Check if two refs are not the same. | |
Ref & | operator= (const Ref &other) noexcept |
Assign a strong reference. | |
template<class D , typename = typename std::enable_if<std::is_convertible<D*, T*>::value>::type> | |
Ref & | operator= (const Ref< D > &other) noexcept |
Assign a strong reference. | |
Ref & | operator= (T *ptr) noexcept |
Assign a raw pointer. | |
Ref & | operator= (std::nullptr_t) noexcept |
Assign a nullptr_t. | |
Ref & | assign (T *ptr) noexcept |
Assign an object. Presumes shared ownership, increases reference count. | |
Ref & | acquire (T *ptr) noexcept |
Acquire ownership of the object. | |
Ref & | make_ref (T *ptr) noexcept |
Create ref without acquiring ownership. | |
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. |
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. |
fsdk::Ref< T >::Ref | ( | const Ref< D > & | other | ) | [inline, explicit] |
Initializes object pointer with other and retains a reference.
[in] | other | pointer of derived template class 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. |
T** fsdk::Ref< T >::getInitReference | ( | ) | [inline] |
Access pointer for initialization.
Create ref without acquiring ownership.
[in] | ptr | raw object pointer. |
Check if two refs are not the same.
[in] | other | ref to check against. |
T* fsdk::Ref< T >::operator-> | ( | ) | const [inline] |
Access pointer.
Assign a strong reference.
[in] | other | strong reference. |
Ref& fsdk::Ref< T >::operator= | ( | const Ref< D > & | other | ) | [inline] |
Assign a strong reference.
[in] | other | strong reference of derived template class. |
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. |