LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LEventQueue Class Reference

#include <EventQueue.h>

Inheritance diagram for LkEngine::LEventQueue:
LkEngine::LObject LkEngine::LObjectBase

Public Member Functions

 LEventQueue (std::string_view InQueueName)
 
 LEventQueue (std::string_view InQueueName, const FEventHandler InHandler)
 
 LEventQueue (const LEventQueue &Other)=delete
 
 LEventQueue (LEventQueue &&Other)=delete
 
LEventQueueoperator= (const LEventQueue &Other)=delete
 
LEventQueueoperator= (LEventQueue &&Other)=delete
 
void AttachHandler (const FEventHandler InHandler)
 
FORCEINLINE void Process (const uint16_t MaxThreshold=0)
 
template<typename FirstFilter , typename... RemainingFilters>
FORCEINLINE void ProcessFiltered (const uint16_t MaxThreshold=0)
 
template<typename EventType , typename... EventArgs>
FORCEINLINE void Add (EventArgs &&... Args)
 
std::size_t GetCount () const
 
const char * GetName () const
 
FORCEINLINE EventContainer::iterator begin ()
 
FORCEINLINE EventContainer::iterator end ()
 
- Public Member Functions inherited from LkEngine::LObject
 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from LkEngine::LObject
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 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.
 
- Protected Attributes inherited from LkEngine::LObject
FObjectHandle ObjectHandle = 0
 
bool bObjectInitialized = false
 
EObjectFlag ObjectFlags = EObjectFlag::None
 
std::atomic< uint32_t > Ptr_ReferenceCount = 0
 

Detailed Description

LEventQueue

Queue structure for events.

Member Function Documentation

◆ Add()

template<typename EventType , typename... EventArgs>
FORCEINLINE void LkEngine::LEventQueue::Add ( EventArgs &&... Args)
inline

Enqueue an event.

The passed arguments must match the LEvent constructor for the used EventType.

◆ GetCount()

std::size_t LkEngine::LEventQueue::GetCount ( ) const
inline

Get the current count of queued events.

◆ GetName()

const char * LkEngine::LEventQueue::GetName ( ) const
inline

Get the name of the event queue instance.

◆ Process()

FORCEINLINE void LkEngine::LEventQueue::Process ( const uint16_t MaxThreshold = 0)
inline

Process queued events.

Handles queued events up to the passed threshold or until empty if the threshold is set to 0 (default).

◆ ProcessFiltered()

template<typename FirstFilter , typename... RemainingFilters>
FORCEINLINE void LkEngine::LEventQueue::ProcessFiltered ( const uint16_t MaxThreshold = 0)
inline

Process queued events of a certain type.

Handles events up to the passed threshold or until empty if the threshold is set to 0.


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