LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::TObjectPtr< T > Class Template Reference

#include <ObjectPtr.h>

Public Member Functions

 TObjectPtr (T *Instance=nullptr)
 
 TObjectPtr (T &Object)
 
 TObjectPtr (const T &Object)
 
 TObjectPtr (const TObjectPtr< T > &Other)
 
template<typename R >
 TObjectPtr (const TObjectPtr< R > &Other)
 
 TObjectPtr (TObjectPtr< T > &&Other) noexcept
 
template<typename R >
 TObjectPtr (TObjectPtr< R > &&Other)
 
TObjectPtroperator= (std::nullptr_t)
 
TObjectPtroperator= (const TObjectPtr< T > &Other)
 
template<typename R >
FORCEINLINE TObjectPtroperator= (const TObjectPtr< R > &Other)
 
template<typename R >
FORCEINLINE TObjectPtroperator= (TObjectPtr< R > &&Other)
 
FORCEINLINE operator bool ()
 
FORCEINLINE operator bool () const
 
FORCEINLINE bool operator== (std::nullptr_t) const
 
FORCEINLINE bool operator== (const T *Other) const
 
FORCEINLINE T * operator-> ()
 
FORCEINLINE const T * operator-> () const
 
FORCEINLINE T & operator* ()
 
FORCEINLINE const T & operator* () const
 
FORCEINLINE T * Get ()
 
FORCEINLINE const T * Get () const
 
template<typename R >
FORCEINLINE TObjectPtr< R > As () const
 
FORCEINLINE void Reset (T *ObjectRef=nullptr)
 
FORCEINLINE void Release ()
 
FORCEINLINE bool IsEqual (const TObjectPtr< T > &Other) const
 

Static Public Member Functions

template<typename ... TArgs>
static TObjectPtr< T > Create (TArgs &&... Args)
 Create new pointer instance of type T.
 

Detailed Description

template<typename T>
class LkEngine::TObjectPtr< T >

Smart pointer for managing LObject's with reference counting and tracking. Provides automatic reference counting, basic type safety and the ability to track live object references for memory management. Supports initialization from raw pointers, other TObjectPtr instances and conversion between compatible types.

Member Function Documentation

◆ Create()

template<typename T >
template<typename ... TArgs>
static TObjectPtr< T > LkEngine::TObjectPtr< T >::Create ( TArgs &&... Args)
static

Create new pointer instance of type T.

Returns
pointer to the new object.

The documentation for this class was generated from the following files: