LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::TObjectPtr_Internal Namespace Reference

Internal functions used by TObjectPtr for managing live LObject references. More...

Functions

void AddToLiveReferences (void *InObject)
 Add a LObject instance to the live references.
 
void RemoveFromLiveReferences (void *InObject)
 Remove a LObject instance from the live references.
 
bool IsLive (void *InObject)
 Check if a LObject instance is alive.
 
int GetLiveReferences (std::unordered_set< void * > &InSet)
 Populate a set with all live references.
 
int GetLiveObjects (std::vector< TObjectPtr< LObject > > &ObjectArray, const bool FilterByStaticClass=true)
 Populare a vector with live objects.
 

Variables

std::unordered_set< void * > LiveReferences
 
std::mutex LiveReferenceMutex
 

Detailed Description

Internal functions used by TObjectPtr for managing live LObject references.

Note
For internal use by TObjectPtr.

Function Documentation

◆ AddToLiveReferences()

void LkEngine::TObjectPtr_Internal::AddToLiveReferences ( void * InObject)

Add a LObject instance to the live references.

Does nothing if the instance already has been added.

◆ GetLiveObjects()

int LkEngine::TObjectPtr_Internal::GetLiveObjects ( std::vector< TObjectPtr< LObject > > & ObjectArray,
const bool FilterByStaticClass = true )

Populare a vector with live objects.

Returns
The count of live objects.

◆ GetLiveReferences()

int LkEngine::TObjectPtr_Internal::GetLiveReferences ( std::unordered_set< void * > & InSet)

Populate a set with all live references.

Returns
The count of live objects that was added onto the set.

◆ IsLive()

bool LkEngine::TObjectPtr_Internal::IsLive ( void * InObject)

Check if a LObject instance is alive.

Returns
true if the reference count for the LObject instance is larger than 0, else false.

◆ RemoveFromLiveReferences()

void LkEngine::TObjectPtr_Internal::RemoveFromLiveReferences ( void * InObject)

Remove a LObject instance from the live references.

Does nothing if the instance does not exist in the live set.

Variable Documentation

◆ LiveReferenceMutex

std::mutex LkEngine::TObjectPtr_Internal::LiveReferenceMutex

Mutex used on modifications of the live object's set.

Note
Defined in ObjectPtr.tpp

◆ LiveReferences

std::unordered_set< void * > LkEngine::TObjectPtr_Internal::LiveReferences

Set of live references.

Note
Defined in ObjectPtr.tpp