Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Faro::IThread Class Referenceabstract

Base class for a thread. More...

#include <Thread.hpp>

Inheritance diagram for Faro::IThread:
Faro::IThreadInterface

Public Member Functions

 IThread ()
 
void Start ()
 Start the thread.
 
void RequestStop ()
 Request the thread to stop.
 
void WaitForStop ()
 Request the thread to stop and wait for it.
 
bool IsRunning ()
 Check if the thread is currently running.
 
String GetThreadId () override
 
void AddTask (ThreadTask task)
 Schedule the supplied task to be executed ont this thread.
 

Protected Member Functions

virtual void ThreadInit ()=0
 Executed while starting the thread.
 
virtual void ThreadUpdate ()=0
 Executed while the thread is active.
 
virtual void ThreadDestroy ()=0
 Executed when the thread is being stopped.
 
void RunTasks ()
 Executed any pending tasks.
 
void RegisterThread ()
 
void UnregisterThread ()
 

Detailed Description

Base class for a thread.

Constructor & Destructor Documentation

◆ IThread()

Faro::IThread::IThread ( )
inline

Member Function Documentation

◆ AddTask()

void Faro::IThreadInterface::AddTask ( ThreadTask  task)
inherited

Schedule the supplied task to be executed ont this thread.

Parameters
taskTask function to execute

◆ GetThreadId()

String Faro::IThread::GetThreadId ( )
overridevirtual

◆ IsRunning()

bool Faro::IThread::IsRunning ( )

Check if the thread is currently running.

Returns
true The thread is running
false The thread is not running

◆ RegisterThread()

void Faro::IThreadInterface::RegisterThread ( )
protectedinherited

◆ RequestStop()

void Faro::IThread::RequestStop ( )

Request the thread to stop.

◆ RunTasks()

void Faro::IThreadInterface::RunTasks ( )
protectedinherited

Executed any pending tasks.

◆ Start()

void Faro::IThread::Start ( )

Start the thread.

◆ ThreadDestroy()

virtual void Faro::IThreadInterface::ThreadDestroy ( )
protectedpure virtualinherited

Executed when the thread is being stopped.

Implemented in Faro::MainThread.

◆ ThreadInit()

virtual void Faro::IThreadInterface::ThreadInit ( )
protectedpure virtualinherited

Executed while starting the thread.

Implemented in Faro::MainThread.

◆ ThreadUpdate()

virtual void Faro::IThreadInterface::ThreadUpdate ( )
protectedpure virtualinherited

Executed while the thread is active.

Implemented in Faro::MainThread.

◆ UnregisterThread()

void Faro::IThreadInterface::UnregisterThread ( )
protectedinherited

◆ WaitForStop()

void Faro::IThread::WaitForStop ( )

Request the thread to stop and wait for it.


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