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

Low level implementation of UObject, should not be used directly in game code Taken from UE's UObjectBaseUtility.h. More...

#include <UObjectBase.h>

Inheritance diagram for Karma::UObjectBase:

Public Member Functions

 UObjectBase (UClass *inClass, EObjectFlags inFlags, EInternalObjectFlags inInternalFlags, UObject *inOuter, const std::string &inName)
 
UPackageGetPackage () const
 
UPackageGetExternalPackage () const
 
bool IsUnreachable () const
 
FORCEINLINE void SetInternalIndex (uint32_t StoreIndex)
 
FORCEINLINE uint32_t GetInterIndex () const
 
void MarkAsGarbage ()
 
void ClearGarbage ()
 
FORCEINLINE const std::string & GetName () const
 
FORCEINLINE void SetObjectName (const std::string &aName)
 
FORCEINLINE UObjectGetOuter () const
 
UObjectGetTypedOuter (UClass *Target) const
 
template<typename T >
T * GetTypedOuter () const
 
bool IsValidLowLevel () const
 
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 
FORCEINLINE UClassGetClass () const
 
FORCEINLINE EObjectFlags GetFlags () const
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 
FORCEINLINE void ClearFlags (EObjectFlags NewFlags)
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 
FORCEINLINE void AddToRoot ()
 

Static Public Member Functions

static FORCEINLINE EInternalObjectFlags FixGarbageOrPendingKillInternalObjectFlags (const EInternalObjectFlags InFlags)
 

Protected Member Functions

FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Detailed Description

Low level implementation of UObject, should not be used directly in game code Taken from UE's UObjectBaseUtility.h.

Constructor & Destructor Documentation

◆ UObjectBase()

Karma::UObjectBase::UObjectBase ( UClass * inClass,
EObjectFlags inFlags,
EInternalObjectFlags inInternalFlags,
UObject * inOuter,
const std::string & inName )

Constructor used by StaticAllocateObject

Parameters
InClassnon NULL, this gives the class of the new object, if known at this time
InFlagsRF_Flags to assign
InOuterouter for this object
InNamename of the new object
InObjectArchetypearchetype to assign (not functional for now)
See also
StaticAllocateObject() in UObjectGlobals.h

Member Function Documentation

◆ AddToRoot()

FORCEINLINE void Karma::UObjectBase::AddToRoot ( )
inline

Add an object to the root set. This prevents the object and all its descendants from being deleted during garbage collection.

◆ ClearFlags()

FORCEINLINE void Karma::UObjectBase::ClearFlags ( EObjectFlags NewFlags)
inline

Clears subset of flags for a specific object

◆ ClearGarbage()

void Karma::UObjectBase::ClearGarbage ( )

Unmarks this object as Garbage.

◆ FixGarbageOrPendingKillInternalObjectFlags()

static FORCEINLINE EInternalObjectFlags Karma::UObjectBase::FixGarbageOrPendingKillInternalObjectFlags ( const EInternalObjectFlags InFlags)
inlinestatic

Helper function that sets the appropriate flag based on PK being enabled or not

◆ GetClass()

FORCEINLINE UClass * Karma::UObjectBase::GetClass ( ) const
inline

Returns the UClass that defines the fields of this object

◆ GetExternalPackage()

UPackage * Karma::UObjectBase::GetExternalPackage ( ) const

Returns the external UPackage associated with this object, if any

◆ GetFlags()

FORCEINLINE EObjectFlags Karma::UObjectBase::GetFlags ( ) const
inline

Retrieve the object flags directly

Returns
Flags for this object

◆ GetName()

FORCEINLINE const std::string & Karma::UObjectBase::GetName ( ) const
inline

Returns the logical name of this object

◆ GetOuter()

FORCEINLINE UObject * Karma::UObjectBase::GetOuter ( ) const
inline

Returns the UObject this object resides in

◆ GetPackage()

UPackage * Karma::UObjectBase::GetPackage ( ) const

Walks up the list of outers until it finds a package directly associated with the object.

Returns
the package the object is in.

◆ GetTypedOuter() [1/2]

template<typename T >
T * Karma::UObjectBase::GetTypedOuter ( ) const
inline

Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)

Returns
a pointer to the first object in this object's Outer chain which is of the correct type.

◆ GetTypedOuter() [2/2]

UObject * Karma::UObjectBase::GetTypedOuter ( UClass * Target) const

Traverses the outer chain searching for the next object of a certain type. (T must be derived from UObject)

Parameters
Targetclass to search for
Returns
a pointer to the first object in this object's Outer chain which is of the correct type.

◆ HasAnyFlags()

FORCEINLINE bool Karma::UObjectBase::HasAnyFlags ( EObjectFlags FlagsToCheck) const
inline

Used to safely check whether any of the passed in flags are set.

Parameters
FlagsToCheckObject flags to check for.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ HasAnyInternalFlags()

FORCEINLINE bool Karma::UObjectBase::HasAnyInternalFlags ( EInternalObjectFlags FlagsToCheck) const
inline

Used to safely check whether any of the passed in internal flags are set.

Parameters
FlagsToCheckObject flags to check for.
Returns
true if any of the passed in flags are set, false otherwise (including no flags passed in).

◆ IsA()

template<typename OtherClassType >
FORCEINLINE bool Karma::UObjectBase::IsA ( OtherClassType SomeBase) const
inline

Returns true if this object is of the specified type.

◆ IsUnreachable()

bool Karma::UObjectBase::IsUnreachable ( ) const

Checks if the object is unreachable.

◆ IsValidLowLevel()

bool Karma::UObjectBase::IsValidLowLevel ( ) const

Checks to see if the object appears to be valid

Returns
true if this appears to be a valid object

◆ MarkAsGarbage()

void Karma::UObjectBase::MarkAsGarbage ( )

Marks the object for garbage collection

◆ SetFlags()

FORCEINLINE void Karma::UObjectBase::SetFlags ( EObjectFlags NewFlags)
inline

Modifies object flags for a specific object

◆ SetFlagsTo()

FORCEINLINE void Karma::UObjectBase::SetFlagsTo ( EObjectFlags NewFlags)
inlineprotected

Set the object flags directly

◆ SetInternalFlags()

FORCEINLINE void Karma::UObjectBase::SetInternalFlags ( EInternalObjectFlags FlagsToSet) const
inline

Sets internal flags of the FUObjectItem

Parameters
FlagsToSet

◆ SetInternalIndex()

FORCEINLINE void Karma::UObjectBase::SetInternalIndex ( uint32_t StoreIndex)
inline

Set indexing for GUObjectStore for lookup of UObjects.


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