#include <Object.h>
|
| 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 LClass * | ObjectRegistration ()=0 |
| Register object class.
|
|
virtual FORCEINLINE const LClass * | GetClass () const |
| Get the class for this LObject.
|
|
virtual std::string | ClassName () const =0 |
| Get name of the LObject class.
|
|
LObject & | operator= (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.
|
|
template<typename OtherClassType > |
FORCEINLINE bool | IsA (OtherClassType OtherObject) const |
| Check if the object is the same type as the passed object's.
|
|
|
static FORCEINLINE const LClass * | StaticClass () |
| Get static class object.
|
|
static FORCEINLINE std::string | StaticClassName () |
| Static class name.
|
|
template<typename T > |
static void | ValidateLObjectImplementation () |
| Validate the implementation of a LObject.
|
|
template<typename ClassType > |
static FORCEINLINE bool | IsChildOf (const ClassType *InObjectClass, const ClassType *InOtherClass) |
| Check if the object is a child of another class.
|
|
|
template<typename T > |
class | TObjectPtr |
|
struct | FInternalLObjectValidator |
|
The base object class used in LkEngine.
◆ ClassName()
virtual std::string LkEngine::LObject::ClassName |
( |
| ) |
const |
|
pure virtual |
Get name of the LObject class.
Implemented by the LCLASS macro.
◆ Destroy()
virtual void LkEngine::LObject::Destroy |
( |
| ) |
|
|
inlinevirtual |
Destroy object, releasing all resources.
Reimplemented in LkEngine::IAssetManager, LkEngine::LEditorAssetManager, LkEngine::LLayerStack, LkEngine::LOpenGLContext, LkEngine::LOpenGLImGuiLayer, LkEngine::LOpenGLRenderer, LkEngine::LRenderContext, LkEngine::LRenderer2DAPI, LkEngine::LRendererAPI, LkEngine::LRuntimeAssetManager, LkEngine::LSceneRenderer, LkEngine::LSwapChain, LkEngine::LUILayer, LkEngine::LWindow, and LkEngine::OpenGLSwapChain.
◆ 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()
void LkEngine::LObject::Initialize |
( |
| ) |
|
|
virtual |
Initialize object.
Reimplemented in LkEngine::IAssetManager, LkEngine::IPanel, LkEngine::LApplication, LkEngine::LEditorAssetManager, LkEngine::LEditorCamera, LkEngine::LKeyboard, LkEngine::LOpenGLImGuiLayer, LkEngine::LOpenGLRenderer, LkEngine::LPanelManager, LkEngine::LRenderer2D, LkEngine::LRenderer2DAPI, LkEngine::LRendererAPI, LkEngine::LRuntimeAssetManager, LkEngine::LSceneRenderer, LkEngine::LSwapChain, LkEngine::LUILayer, LkEngine::LWindow, and LkEngine::OpenGLSwapChain.
◆ 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).
◆ 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:
- LkEngine/Source/LkEngine/Core/LObject/Object.h
- LkEngine/Source/LkEngine/Core/LObject/Object.cpp