Karma Engine
Loading...
Searching...
No Matches
Karma::FUObjectArray Class Reference

#include <UObjectGlobals.h>

Inheritance diagram for Karma::FUObjectArray:
Collaboration diagram for Karma::FUObjectArray:

Classes

class  TIterator
 

Public Member Functions

void AddUObject (UObject *Object)
 
const std::vector< FUObjectItem * > & GetObjectsList () const
 
- Public Member Functions inherited from KarmaVector< FUObjectItem * >
uint32_t Remove (FUObjectItem *aBlock)
 
void Add (FUObjectItem *aBlock)
 
FORCEINLINE int32_t AddUnique (const FUObjectItem *&Item)
 
int32_t Find (const FUObjectItem *&Item) const
 
bool Contains (FUObjectItem *aBlock) const
 
uint32_t Num () const
 
void Reset ()
 
void SmartReset ()
 
void SetVectorElementByIndex (int32_t Index, FUObjectItem *Value)
 
const std::vector< FUObjectItem * > & GetElements () const
 
std::vector< FUObjectItem * > & ModifyElements ()
 
std::vector< FUObjectItem * >::iterator begin ()
 
std::vector< FUObjectItem * >::iterator end ()
 
FORCEINLINE FUObjectItem *& IndexToObject (int32_t Index)
 
FORCEINLINE bool IsValidIndex (int32_t Index) const
 

Additional Inherited Members

- Protected Attributes inherited from KarmaVector< FUObjectItem * >
std::vector< FUObjectItem * > m_Elements
 

Detailed Description

A class for managing the collection of UObjects (all or some?)

Note from UE devlopers (for the class FUObjectArray): Note the layout of this data structure is mostly to emulate the old behavior and minimize code rework during code restructure. Better data structures could be used in the future, for example maybe all that is needed is a TSet<UObject *> One has to be a little careful with this, especially with the GC optimization. I have seen spots that assume that non-GC objects come before GC ones during iteration.

Member Function Documentation

◆ AddUObject()

void Karma::FUObjectArray::AddUObject ( UObject * Object)

Add an element to the list

Taken from Game Coding Complete 4th edition, page 169. There is variety of ways for indexing the UObjects, for simplicity we will start with number and based upon the complexity (if any?) we may transition to more appropriate indexing scheme as per the need.

◆ GetObjectsList()

const std::vector< FUObjectItem * > & Karma::FUObjectArray::GetObjectsList ( ) const
inline

Retrieve the list of the UObjects


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