You.i Engine
CYIEventDispatcherThread Class Reference

#include <thread/YiEventDispatcherThread.h>

Inheritance diagram for CYIEventDispatcherThread:

Public Member Functions

 CYIEventDispatcherThread (const CYIString &name=CYIString(), YI_PRIORITY ePriority=YI_PRIORITY_DEFAULT, uint32_t uStackSize=DEFAULT_STACK_SIZE)
 
virtual ~CYIEventDispatcherThread ()
 
void Exit (bool bJoin=false)
 
const std::shared_ptr< CYIEventDispatcher > & GetEventDispatcher () const
 
- Public Member Functions inherited from CYIThread
 CYIThread (const CYIString &name=CYIString(), YI_PRIORITY ePriority=YI_PRIORITY_DEFAULT, uint32_t uStackSize=DEFAULT_STACK_SIZE)
 
virtual ~CYIThread ()
 
bool StartThread (YI_START_TYPE eStartType=BLOCK_UNTIL_STARTED)
 
void Terminate ()
 
void EnableTermination ()
 
void DisableTermination ()
 
bool IsTerminationEnabled ()
 
bool Join ()
 
bool Join (uint32_t uTimeoutMs)
 
bool IsRunning () const
 
CYIThreadHandle GetThreadId () const
 
void SetName (const CYIString &name)
 
const CYIStringGetName () const
 
void SetPriority (YI_PRIORITY priority)
 
YI_PRIORITY GetPriority () const
 
bool AddThreadListener (Listener *pListener)
 
bool RemoveThreadListener (Listener *pListener)
 
bool SetStackSize (uint32_t uStackSize)
 
uint32_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  YI_START_TYPE {
  BLOCK_UNTIL_STARTED = true,
  NON_BLOCKING = false
}
 
- Static Public Member Functions inherited from CYIThread
static CYIThreadHandle GetCurrentThreadId ()
 
static const CYIThreadHandleGetUIThreadId ()
 
static int32_t GetOSIdealThreadCount ()
 
static void Sleep (uint32_t uMillis)
 
static void YieldCurrentThread ()
 
static void ReportDefaults ()
 
- Static Public Attributes inherited from CYIThread
static const uint32_t DEFAULT_STACK_SIZE = 128 * 1024
 

Constructor & Destructor Documentation

CYIEventDispatcherThread::CYIEventDispatcherThread ( const CYIString name = CYIString(),
YI_PRIORITY  ePriority = YI_PRIORITY_DEFAULT,
uint32_t  uStackSize = DEFAULT_STACK_SIZE 
)
virtual CYIEventDispatcherThread::~CYIEventDispatcherThread ( )
virtual

Member Function Documentation

void CYIEventDispatcherThread::Exit ( bool  bJoin = false)
const std::shared_ptr< CYIEventDispatcher > & CYIEventDispatcherThread::GetEventDispatcher ( ) const
inline
virtual void CYIEventDispatcherThread::OnThreadStarted ( CYIThread )
overrideprotectedvirtual

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

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

Reimplemented from CYIThread::Listener.

virtual void CYIEventDispatcherThread::OnThreadTerminated ( CYIThread )
overrideprotectedvirtual

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

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

Reimplemented from CYIThread::Listener.

virtual void CYIEventDispatcherThread::Run ( )
overrideprotectedvirtual

Implements CYIThread.

Member Data Documentation

std::shared_ptr<CYIEventDispatcher> CYIEventDispatcherThread::m_pEventDispatcher
protected

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