LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LObject Class Referenceabstract

#include <Object.h>

Inheritance diagram for LkEngine::LObject:
LkEngine::LObjectBase LkEngine::IAssetManager LkEngine::IPanel LkEngine::LApplication LkEngine::LArrayTexture LkEngine::LAsset LkEngine::LCamera LkEngine::LEntity LkEngine::LEventQueue LkEngine::LFramebuffer LkEngine::LImage LkEngine::LIndexBuffer LkEngine::LKeyboard LkEngine::LLayer LkEngine::LLayerStack LkEngine::LMaterial LkEngine::LMaterialTable LkEngine::LMeshSerializer LkEngine::LMeshSourceSerializer LkEngine::LPanelManager LkEngine::LPipeline LkEngine::LProject LkEngine::LRenderCommandBuffer LkEngine::LRenderContext LkEngine::LRenderPass LkEngine::LRenderer2D LkEngine::LRenderer2DAPI LkEngine::LRendererAPI LkEngine::LSceneRenderer LkEngine::LSceneSerializer LkEngine::LSelectionContext LkEngine::LShader LkEngine::LShaderLibrary LkEngine::LStaticMeshSerializer LkEngine::LSwapChain LkEngine::LUniformBuffer LkEngine::LUniformBufferSet LkEngine::LVertexBuffer LkEngine::LViewport LkEngine::LWindow LkEngine::Test::LAutomationTest LkEngine::Test::LDummyTestClass LkEngine::Test::LDummyTestClassExpanded

Public Member Functions

 LObject (const LObject &Other)
 
virtual void Initialize ()
 Initialize object.
 
virtual void Destroy ()
 Destroy object, releasing all resources.
 
virtual FORCEINLINE bool IsInitialized () const
 Check if object is initialized.
 
FORCEINLINE FObjectHandle GetObjectHandle () const
 Get the object handle.
 
virtual FORCEINLINE bool IsObjectValid () const
 Check if object is valid for use.
 
virtual const LClassObjectRegistration ()=0
 Register object class.
 
virtual FORCEINLINE const LClassGetClass () const
 Get the class for this LObject.
 
virtual std::string ClassName () const =0
 Get name of the LObject class.
 
LObjectoperator= (const LObject &Other)
 
void MarkAsGarbage ()
 Mark object as garbage.
 
template<typename T >
T & As ()
 Cast object to type T.
 
template<typename T >
const T & As () const
 Cast object to type T.
 
template<typename T >
bool IsA () const
 Check if the object is or is a derivation of type T.
 
virtual FORCEINLINE bool IsAsset () const
 Check if object is an asset.
 
FORCEINLINE uint32_t GetReferenceCount () const
 Return current reference count from all object pointers.
 
- Public Member Functions inherited from LkEngine::LObjectBase
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType OtherObject) const
 Check if the object is the same type as the passed object's.
 

Static Public Member Functions

static FORCEINLINE const LClassStaticClass ()
 Get static class object.
 
static FORCEINLINE std::string StaticClassName ()
 Static class name.
 
template<typename T >
static void ValidateLObjectImplementation ()
 Validate the implementation of a LObject.
 
- Static Public Member Functions inherited from LkEngine::LObjectBase
template<typename ClassType >
static FORCEINLINE bool IsChildOf (const ClassType *InObjectClass, const ClassType *InOtherClass)
 Check if the object is a child of another class.
 

Protected Attributes

FObjectHandle ObjectHandle = 0
 
bool bObjectInitialized = false
 
EObjectFlag ObjectFlags = EObjectFlag::None
 
std::atomic< uint32_t > Ptr_ReferenceCount = 0
 

Friends

template<typename T >
class TObjectPtr
 
struct FInternalLObjectValidator
 

Additional Inherited Members

- Protected Member Functions inherited from LkEngine::LObjectBase
void SetClass (LClass *InClass)
 Set the class.
 
FORCEINLINE const LClassGetClass () const
 Get the private class member.
 
FORCEINLINE bool IsClassValid () const
 Check if LObjectBase has a valid LClass object.
 

Detailed Description

The base object class used in LkEngine.

Member Function Documentation

◆ ClassName()

virtual std::string LkEngine::LObject::ClassName ( ) const
pure virtual

Get name of the LObject class.

Implemented by the LCLASS macro.

◆ Destroy()

◆ GetClass()

virtual FORCEINLINE const LClass * LkEngine::LObject::GetClass ( ) const
inlinevirtual

Get the class for this LObject.

No null-checks should be done inside this function since it is used to determine the class registration at places, i.e the return value is used to determine if the class is registered depending if nullptr or not.

Implemented by the LCLASS macro.

◆ Initialize()

◆ IsA()

template<typename T >
bool LkEngine::LObject::IsA ( ) const
inline

Check if the object is or is a derivation of type T.

TODO: CHANGE THIS

◆ ObjectRegistration()

virtual const LClass * LkEngine::LObject::ObjectRegistration ( )
pure virtual

Register object class.

Implemented by the LOBJECT macro (LCLASS/LSTRUCT).

◆ StaticClass()

static FORCEINLINE const LClass * LkEngine::LObject::StaticClass ( )
inlinestatic

Get static class object.

Implemented for every LClass.

◆ StaticClassName()

static FORCEINLINE std::string LkEngine::LObject::StaticClassName ( )
inlinestatic

Static class name.

Implemented by the LOBJECT macro (LCLASS/LSTRUCT).

Member Data Documentation

◆ Ptr_ReferenceCount

std::atomic<uint32_t> LkEngine::LObject::Ptr_ReferenceCount = 0
mutableprotected

@variable Reference count is managed by TObjectPtr.


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