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

#include <Class.h>

Inheritance diagram for Karma::UClass:
Collaboration diagram for Karma::UClass:

Public Member Functions

 UClass ()
 
 UClass (const std::string &name)
 
 UClass (const std::string &name, size_t size, size_t alignment, ClassConstructorType inClassConstructor)
 
virtual const std::string & GetDesc () override
 Return a one line description of an object for viewing in the thumbnail view of the generic browser.
 
FORCEINLINE bool HasAnyClassFlags (EClassFlags FlagsToCheck) const
 
virtual void SetupObjectInitializer (FObjectInitializer &ObjectInitializer) const
 
UObjectGetDefaultObject (bool bCreateIfNeeded=true) const
 
template<class T >
T * GetDefaultObject () const
 
UClassGetSuperClass () const
 
FORCEINLINE size_t GetMinAlignment () const
 
virtual void SetSuperStruct (UStruct *NewSuperStruct) override
 
virtual void InitPropertiesFromCustomList (uint8_t *DataPtr, const uint8_t *DefaultDataPtr)
 
- Public Member Functions inherited from Karma::UStruct
bool IsChildOf (const UStruct *SomeBase) const
 
UStructGetSuperStruct () const
 
FORCEINLINE size_t GetPropertiesSize () const
 
- Public Member Functions inherited from Karma::UObject
 UObject ()
 
virtual void FinishDestroy ()
 
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

ClassConstructorType m_ClassConstructor
 
EClassFlags m_ClassFlags
 
- Public Attributes inherited from Karma::UStruct
size_t m_PropertiesSize
 
size_t m_MinAlignment
 

Protected Member Functions

virtual UObjectCreateDefaultObject ()
 
- Protected Member Functions inherited from Karma::UObjectBase
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

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)
 

Detailed Description

An object class.

Constructor & Destructor Documentation

◆ UClass() [1/2]

Karma::UClass::UClass ( )

Constructors

◆ UClass() [2/2]

Karma::UClass::UClass ( const std::string & name,
size_t size,
size_t alignment,
ClassConstructorType inClassConstructor )

A useful constructor for StaticClass initialization

See also
GetPrivateStaticClassBody in Object.cpp

Member Function Documentation

◆ CreateDefaultObject()

UObject * Karma::UClass::CreateDefaultObject ( )
protectedvirtual

Get the default object from the class, creating it if missing, if requested or under a few other circumstances

Returns
the CDO for this class

◆ GetDefaultObject() [1/2]

template<class T >
T * Karma::UClass::GetDefaultObject ( ) const
inline

Get the default object from the class and cast to a particular type

Returns
the CDO for this class

◆ GetDefaultObject() [2/2]

UObject * Karma::UClass::GetDefaultObject ( bool bCreateIfNeeded = true) const
inline

Get the default object from the class

Parameters
bCreateIfNeededif true (default) then the CDO is created if it is null
Returns
the CDO for this class

◆ GetDesc()

const std::string & Karma::UClass::GetDesc ( )
overridevirtual

Return a one line description of an object for viewing in the thumbnail view of the generic browser.

Todo
Place holder for now. Plan to rewrite once Editor reaches that stage
Since
Karma 1.0.0

Reimplemented from Karma::UObject.

◆ GetMinAlignment()

FORCEINLINE size_t Karma::UClass::GetMinAlignment ( ) const
inline

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

◆ GetSuperClass()

UClass * Karma::UClass::GetSuperClass ( ) const
inline

Returns parent class, the parent of a Class is always another class

◆ HasAnyClassFlags()

FORCEINLINE bool Karma::UClass::HasAnyClassFlags ( EClassFlags FlagsToCheck) const
inline

Used to safely check whether the passed in flag is set.

Parameters
FlagsToCheckClass flag(s) to check for
Returns
true if the passed in flag is set, false otherwise (including no flag passed in, unless the FlagsToCheck is CLASS_AllFlags)

◆ InitPropertiesFromCustomList()

virtual void Karma::UClass::InitPropertiesFromCustomList ( uint8_t * DataPtr,
const uint8_t * DefaultDataPtr )
inlinevirtual

Helper method to assist with initializing object properties from an explicit list.

Parameters
InStructthe current scope for which the given property list applies
DataPtrdestination address (where to start copying values to)
DefaultDataPtrsource address (where to start copying the defaults data from)

◆ SetSuperStruct()

void Karma::UClass::SetSuperStruct ( UStruct * NewSuperStruct)
overridevirtual

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 from Karma::UStruct.

◆ SetupObjectInitializer()

virtual void Karma::UClass::SetupObjectInitializer ( FObjectInitializer & ObjectInitializer) const
inlinevirtual

Allows class to provide data to the object initializer that can affect how native class subobjects are created.

Member Data Documentation

◆ m_ClassConstructor

ClassConstructorType Karma::UClass::m_ClassConstructor

The required type for the outer of instances of this class

◆ m_ClassFlags

EClassFlags Karma::UClass::m_ClassFlags

Class flags; See EClassFlags for more information


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