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

#include <Class.h>

Inheritance diagram for Karma::UStruct:
Collaboration diagram for Karma::UStruct:

Public Member Functions

bool IsChildOf (const UStruct *SomeBase) const
 
UStructGetSuperStruct () const
 
FORCEINLINE size_t GetPropertiesSize () const
 
virtual void SetSuperStruct (UStruct *NewSuperStruct)
 
- Public Member Functions inherited from Karma::UObject
 UObject ()
 
virtual void FinishDestroy ()
 
virtual const std::string & GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser.
 
virtual class UWorldGetWorld () const
 Returns what UWorld this object is contained within.
 
bool IsValidChecked (const UObject *Test)
 
virtual void BeginDestroy ()
 Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 
bool IsSelected () const
 Test the selection state of a UObject.
 
- Public Member Functions inherited from Karma::UObjectBase
 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 ()
 

Public Attributes

size_t m_PropertiesSize
 
size_t m_MinAlignment
 

Additional Inherited Members

- Static Public Member Functions inherited from Karma::UObject
static const char * StaticConfigName ()
 
- Static Public Member Functions inherited from Karma::UObjectBase
static FORCEINLINE EInternalObjectFlags FixGarbageOrPendingKillInternalObjectFlags (const EInternalObjectFlags InFlags)
 
- Protected Member Functions inherited from Karma::UObjectBase
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Detailed Description

Base class for all UObject types that contain fields.

Member Function Documentation

◆ GetPropertiesSize()

FORCEINLINE size_t Karma::UStruct::GetPropertiesSize ( ) const
inline

Total size of all UProperties, the allocated structure may be larger due to alignment

◆ GetSuperStruct()

UStruct * Karma::UStruct::GetSuperStruct ( ) const
inline

Struct this inherits from, may be null

◆ IsChildOf()

bool Karma::UStruct::IsChildOf ( const UStruct * SomeBase) const

Returns true if this struct either is SomeBase, or is a child of SomeBase. This will not crash on null structs

Returns
true if this object is of the specified type.
Todo
write class registration system for comparing UClass
See also
KarmaClassObjectMap::FindClassObjects()

◆ SetSuperStruct()

void Karma::UStruct::SetSuperStruct ( UStruct * NewSuperStruct)
virtual

Sets the super struct pointer and updates hash information as necessary. Note that this is not sufficient to actually reparent a struct, it simply sets a pointer.

Reimplemented in Karma::UClass.

Member Data Documentation

◆ m_MinAlignment

size_t Karma::UStruct::m_MinAlignment

Alignment of structure in memory, structure will be at least this large

◆ m_PropertiesSize

size_t Karma::UStruct::m_PropertiesSize

Total size of all UProperties, the allocated structure may be larger due to alignment

From Epic's code, seems like the size of this object is m_ProperitesSize, for details see https://github.com/EpicGames/UnrealEngine/blob/5ca9da84c694c6eee288c30a547fcaa1a40aed9b/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h#L2016

Ponder why in the world this field is public.


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