Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ThreadClass Class Referenceabstract

#include <thread.h>

Inherited by BuddyThreadClass, GameResultsThreadClass, GameSpyThreadClass, , , and PSThreadClass.

Public Types

typedef int(* ExceptionHandlerType) (int exception_code, struct _EXCEPTION_POINTERS *e_info)
 

Public Member Functions

 ThreadClass (const char *name=NULL, ExceptionHandlerType exception_handler=NULL)
 
virtual ~ThreadClass ()
 
void Execute ()
 
void Set_Priority (int priority)
 
void Stop (unsigned ms=3000)
 
bool Is_Running ()
 
const char * Get_Name (void)
 

Static Public Member Functions

static void Sleep_Ms (unsigned ms=0)
 
static void Switch_Thread ()
 
static unsigned _Get_Current_Thread_ID ()
 
static int Get_Thread_By_Index (int index, char *name_ptr=NULL)
 

Protected Member Functions

virtual void Thread_Function ()=0
 

Protected Attributes

volatile bool running
 
char ThreadName [64]
 
unsigned ThreadID
 
ExceptionHandlerType ExceptionHandler
 

Detailed Description

Definition at line 49 of file thread.h.

Member Typedef Documentation

◆ ExceptionHandlerType

typedef int(* ThreadClass::ExceptionHandlerType) (int exception_code, struct _EXCEPTION_POINTERS *e_info)

Definition at line 52 of file thread.h.

Constructor & Destructor Documentation

◆ ThreadClass()

ThreadClass::ThreadClass ( const char * name = NULL,
ExceptionHandlerType exception_handler = NULL )

Definition at line 32 of file thread.cpp.

◆ ~ThreadClass()

ThreadClass::~ThreadClass ( )
virtual

Definition at line 44 of file thread.cpp.

Member Function Documentation

◆ _Get_Current_Thread_ID()

unsigned ThreadClass::_Get_Current_Thread_ID ( )
static

Definition at line 142 of file thread.cpp.

◆ Execute()

void ThreadClass::Execute ( )

Definition at line 77 of file thread.cpp.

◆ Get_Name()

const char * ThreadClass::Get_Name ( void )
inline

Definition at line 79 of file thread.h.

◆ Get_Thread_By_Index()

static int ThreadClass::Get_Thread_By_Index ( int index,
char * name_ptr = NULL )
static

◆ Is_Running()

bool ThreadClass::Is_Running ( )

Definition at line 151 of file thread.cpp.

◆ Set_Priority()

void ThreadClass::Set_Priority ( int priority)

Definition at line 90 of file thread.cpp.

◆ Sleep_Ms()

void ThreadClass::Sleep_Ms ( unsigned ms = 0)
static

Definition at line 121 of file thread.cpp.

◆ Stop()

void ThreadClass::Stop ( unsigned ms = 3000)

Definition at line 101 of file thread.cpp.

◆ Switch_Thread()

void ThreadClass::Switch_Thread ( )
static

Definition at line 130 of file thread.cpp.

◆ Thread_Function()

virtual void ThreadClass::Thread_Function ( )
protectedpure virtual

Member Data Documentation

◆ ExceptionHandler

ExceptionHandlerType ThreadClass::ExceptionHandler
protected

Definition at line 98 of file thread.h.

◆ running

volatile bool ThreadClass::running
protected

Definition at line 89 of file thread.h.

◆ ThreadID

unsigned ThreadClass::ThreadID
protected

Definition at line 95 of file thread.h.

◆ ThreadName

char ThreadClass::ThreadName[64]
protected

Definition at line 92 of file thread.h.


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