You.i Engine
CYIEventDispatcherThread Class Reference

#include <thread/YiEventDispatcherThread.h>

Inheritance diagram for CYIEventDispatcherThread:

Public Member Functions

 CYIEventDispatcherThread (const CYIString &name=CYIString(), CYIThread::Priority priority=CYIThread::Priority::Default, size_t stackSize=DEFAULT_STACK_SIZE)
virtual ~CYIEventDispatcherThread ()
void Exit (bool join=false)
const std::shared_ptr< CYIEventDispatcher > & GetEventDispatcher () const
- Public Member Functions inherited from CYIThread
 CYIThread (const CYIString &name=CYIString(), Priority priority=Priority::Default, size_t stackSize=DEFAULT_STACK_SIZE)
virtual ~CYIThread ()
bool StartThread (StartType startType=StartType::BlockUntilStarted)
void Terminate ()
void EnableTermination ()
void DisableTermination ()
bool IsTerminationEnabled ()
bool Join ()
bool Join (uint32_t timeoutMs)
bool IsRunning () const
CYIThreadHandle GetThreadId () const
void SetName (const CYIString &name)
const CYIStringGetName () const
void SetPriority (Priority priority)
Priority GetPriority () const
bool AddThreadListener (Listener *pListener)
bool RemoveThreadListener (Listener *pListener)
bool SetStackSize (size_t stackSize)
size_t GetStackSize () const

Protected Member Functions

virtual void OnThreadStarted (CYIThread *pPublisher) override
virtual void Run () override
virtual void OnThreadTerminated (CYIThread *pPublisher) override
- Protected Member Functions inherited from CYIThread
bool IsTerminationRequested () const

Protected Attributes

std::shared_ptr< CYIEventDispatcherm_pEventDispatcher

Additional Inherited Members

- Public Types inherited from CYIThread
enum  Priority {
  Priority::Minimum = 0,
  Priority::Default = Inherited
enum  StartType {
  StartType::NonBlocking = 0,
  StartType::BlockUntilStarted = 1
- Static Public Member Functions inherited from CYIThread
static CYIThreadHandle GetCurrentThreadId ()
static const CYIThreadHandleGetUIThreadId ()
static int32_t GetOSIdealThreadCount ()
static void Sleep (uint32_t millis)
static void YieldCurrentThread ()
static void ReportDefaults ()
- Static Public Attributes inherited from CYIThread
static const size_t DEFAULT_STACK_SIZE = 128 * 1024

Constructor & Destructor Documentation

◆ CYIEventDispatcherThread()

CYIEventDispatcherThread::CYIEventDispatcherThread ( const CYIString name = CYIString(),
CYIThread::Priority  priority = CYIThread::Priority::Default,
size_t  stackSize = DEFAULT_STACK_SIZE 

◆ ~CYIEventDispatcherThread()

virtual CYIEventDispatcherThread::~CYIEventDispatcherThread ( )

Member Function Documentation

◆ Exit()

void CYIEventDispatcherThread::Exit ( bool  join = false)

◆ GetEventDispatcher()

const std::shared_ptr< CYIEventDispatcher > & CYIEventDispatcherThread::GetEventDispatcher ( ) const

◆ OnThreadStarted()

virtual void CYIEventDispatcherThread::OnThreadStarted ( CYIThread )

Called just before the thread's Run() function is called.

This function will be called from the thread's context.

Reimplemented from CYIThread::Listener.

◆ OnThreadTerminated()

virtual void CYIEventDispatcherThread::OnThreadTerminated ( CYIThread )

Called if the thread's execution has been forcefully aborted.

This function will be called from the thread's context.

Reimplemented from CYIThread::Listener.

◆ Run()

virtual void CYIEventDispatcherThread::Run ( )

Implements CYIThread.

Member Data Documentation

◆ m_pEventDispatcher

std::shared_ptr<CYIEventDispatcher> CYIEventDispatcherThread::m_pEventDispatcher

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