KarmaEngine
Game Engine for practical learning and research purposes
|
An object class. More...
#include <Class.h>
Public Member Functions | |
UClass () | |
Default constructor. | |
UClass (const std::string &name) | |
Overloaded constructor. | |
UClass (const std::string &name, size_t size, size_t alignment, ClassConstructorType inClassConstructor) | |
virtual const std::string & | GetDesc () override |
FORCEINLINE bool | HasAnyClassFlags (EClassFlags FlagsToCheck) const |
virtual void | SetupObjectInitializer (FObjectInitializer &ObjectInitializer) const |
UObject * | GetDefaultObject (bool bCreateIfNeeded=true) const |
template<class T> | |
T * | GetDefaultObject () const |
UClass * | GetSuperClass () const |
FORCEINLINE size_t | GetMinAlignment () const |
virtual void | SetSuperStruct (UStruct *NewSuperStruct) override |
virtual void | InitPropertiesFromCustomList (uint8_t *DataPtr, const uint8_t *DefaultDataPtr) |
![]() | |
bool | IsChildOf (const UStruct *SomeBase) const |
UStruct * | GetSuperStruct () const |
FORCEINLINE size_t | GetPropertiesSize () const |
Total size of all UProperties, the allocated structure may be larger due to alignment. | |
![]() | |
UObject () | |
virtual void | FinishDestroy () |
virtual class UWorld * | GetWorld () 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. | |
![]() | |
UObjectBase (UClass *inClass, EObjectFlags inFlags, EInternalObjectFlags inInternalFlags, UObject *inOuter, const std::string &inName) | |
UPackage * | GetPackage () const |
UPackage * | GetExternalPackage () const |
bool | IsUnreachable () const |
FORCEINLINE void | SetInternalIndex (uint32_t StoreIndex) |
FORCEINLINE uint32_t | GetInternalIndex () const |
void | MarkAsGarbage () |
void | ClearGarbage () |
FORCEINLINE const std::string & | GetName () const |
FORCEINLINE void | SetObjectName (const std::string &aName) |
FORCEINLINE UObject * | GetOuter () const |
UObject * | GetTypedOuter (UClass *Target) const |
template<typename T> | |
T * | GetTypedOuter () const |
bool | IsValidLowLevel () const |
template<typename OtherClassType> | |
FORCEINLINE bool | IsA (OtherClassType SomeBase) const |
FORCEINLINE UClass * | GetClass () const |
FORCEINLINE EObjectFlags | GetFlags () const |
FORCEINLINE void | SetFlags (EObjectFlags NewFlags) |
FORCEINLINE void | ClearFlags (EObjectFlags FlagsToClear) |
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 |
![]() | |
size_t | m_PropertiesSize |
size_t | m_MinAlignment |
Protected Member Functions | |
virtual UObject * | CreateDefaultObject () |
![]() | |
UObjectBase () | |
Providing a default constructor. | |
FORCEINLINE void | SetFlagsTo (EObjectFlags NewFlags) |
Additional Inherited Members | |
![]() | |
static const char * | StaticConfigName () |
![]() | |
static FORCEINLINE EInternalObjectFlags | FixGarbageOrPendingKillInternalObjectFlags (const EInternalObjectFlags InFlags) |
An object class.
An UObject derived object with class identification including size, description, class flags and all that
Karma::UClass::UClass | ( | ) |
Default constructor.
Karma::UClass::UClass | ( | const std::string & | name | ) |
Karma::UClass::UClass | ( | const std::string & | name, |
size_t | size, | ||
size_t | alignment, | ||
ClassConstructorType | inClassConstructor ) |
A useful constructor for StaticClass initialization
name | Set the m_NamePrivate of the UClass UObject that is class name of the UObject of UClass |
size | The size (in bytes) of the UObject this object is UClass of |
alignment | Alignment of UObject, this object is UClass of, in memory. The UObject will be at least this large |
inClassConstructor | The custom constructor (InternalConstructor<TClass>) to be called after UObject allocation and during UObject initialization. Calls placement new with specified UObject class constructor. See InClass->m_ClassConstructor line in the routine StaticConstructObject_Internal(const FStaticConstructObjectParameters&) |
|
protectedvirtual |
Get the default object from the class, creating it if missing, if requested or under a few other circumstances
Get the default object from the class, creating it if missing, if requested or under a few other circumstances
|
inline |
Get the default object from the class and cast to a particular type
|
inline |
Get the default object from the class
bCreateIfNeeded | If true (default) then the CDO is created if it is null |
|
overridevirtual |
|
inline |
Alignment of structure in memory, structure will be at least this large
|
inline |
Returns parent class, the parent of a Class is always another class
|
inline |
Used to safely check whether the passed in flag is set.
FlagsToCheck | Class flag(s) to check for |
|
inlinevirtual |
Helper method to assist with initializing object properties from an explicit list.
InStruct | the current scope for which the given property list applies |
DataPtr | destination address (where to start copying values to) |
DefaultDataPtr | source address (where to start copying the defaults data from) |
|
overridevirtual |
Sets the super struct pointer.
Reimplemented from Karma::UStruct.
|
inlinevirtual |
Allows class to provide data to the object initializer that can affect how native class subobjects are created.
ClassConstructorType Karma::UClass::m_ClassConstructor |
EClassFlags Karma::UClass::m_ClassFlags |
Class flags; See Karma::EClassFlags for more information