CThread Class Reference

#include <Thread.h>

Inheritance diagram for CThread:
Inheritance graph
[legend]
Collaboration diagram for CThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual BOOL OnTask (LPVOID lpvData)
virtual BOOL OnTask ()
 CThread (void)
 ~CThread (void)
BOOL KernelProcess ()
BOOL Event (LPVOID lpvData=NULL)
BOOL Event (CTask *pvTask)
void Stop ()
BOOL Start ()
void GetId (ThreadId_t *pId)
ThreadState_t ThreadState ()
BOOL PingThread (DWORD dwTimeout=0)
void SetPriority (DWORD dwPriority=0)
DWORD GetErrorFlags ()
void SetThreadType (ThreadType_t typ=ThreadTypeEventDriven, DWORD dwIdle=100)
void SetIdle (DWORD dwIdle=100)
unsigned int GetEventsPending ()

Static Public Member Functions

static BOOL ThreadIdsEqual (ThreadId_t *p1, ThreadId_t *p2)
static ThreadId_t ThreadId ()

Public Attributes

CMutexClass m_mutex

Private Member Functions

BOOL Push (LPVOID lpv)
BOOL Pop ()
BOOL Empty ()

Private Attributes

CEventClass m_event
BOOL m_bRunning
pthread_t m_thread
ThreadId_t m_dwId
LPVOIDm_lppvQue
unsigned int m_chQue
unsigned int m_quePos
LPVOID m_lpvProcessor
ThreadState_t m_state
DWORD m_dwIdle
ThreadType_t m_type
DWORD m_stackSize
DWORD m_dwObjectCondition

Friends

LPVOID _THKERNEL (LPVOID lpvData)

Constructor & Destructor Documentation

CThread::CThread ( void   ) 

CThread instanciates thread object and starts thread.

Here is the call graph for this function:

CThread::~CThread ( void   ) 

~CThread destructor. Stop should be called prior to destruction to allow for gracefull thread termination.

Here is the call graph for this function:


Member Function Documentation

BOOL CThread::Empty (  )  [private]

Empty returns a value of true if there are no items on the threads que otherwise a value of false is returned.

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CThread::Event ( CTask pvTask  ) 

Here is the call graph for this function:

BOOL CThread::Event ( LPVOID  lpvData = NULL  ) 

Event wakes up a thread to process data

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD CThread::GetErrorFlags (  )  [inline]
unsigned int CThread::GetEventsPending (  ) 

GetEventsPending returns the total number of vents waiting in the event que

Here is the call graph for this function:

void CThread::GetId ( ThreadId_t pId  )  [inline]

Here is the caller graph for this function:

BOOL CThread::KernelProcess (  ) 

KernelProcess routes thread activity

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CThread::OnTask (  )  [virtual]

OnTask overloaded implementation of OnTask that takes no arguments

Reimplemented in treqs::Activator, treqs::Dispatcher, RLSNotifier, treqs::Stager, and CIncrementThread.

Here is the caller graph for this function:

BOOL CThread::OnTask ( LPVOID  lpvData  )  [virtual]

OnTask called when a thread is tasked using the Event member function

Reimplemented in RLSNotifier, treqs::Stager, and CIncrementThread.

Here is the call graph for this function:

BOOL CThread::PingThread ( DWORD  dwTimeout = 0  ) 

PingThread used to determine if a thread is running

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CThread::Pop (  )  [private]

Pop move an object from the input que to the processor

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CThread::Push ( LPVOID  lpv  )  [private]

Push place a data object in the threads que

Here is the call graph for this function:

Here is the caller graph for this function:

void CThread::SetIdle ( DWORD  dwIdle = 100  ) 

SetIdle changes the threads idle interval

Here is the call graph for this function:

Here is the caller graph for this function:

void CThread::SetPriority ( DWORD  dwPriority = 0  ) 

SetPriority sets a threads run priority, see SetThreadPriority Note: only works for Windows family of operating systems

void CThread::SetThreadType ( ThreadType_t  typ = ThreadTypeEventDriven,
DWORD  dwIdle = 100 
)

SetThreadType specifies the type of threading that is to be performed.

ThreadTypeEventDriven (default): an event must be physically sent to the thread using the Event member function.

ThreadTypeIntervalDriven : an event occurs automatically every dwIdle milli seconds.

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CThread::Start (  ) 

Start start thread

Here is the call graph for this function:

Here is the caller graph for this function:

void CThread::Stop (  ) 

Stop stop thread

Here is the call graph for this function:

Here is the caller graph for this function:

static ThreadId_t CThread::ThreadId (  )  [inline, static]

Here is the caller graph for this function:

static BOOL CThread::ThreadIdsEqual ( ThreadId_t p1,
ThreadId_t p2 
) [inline, static]

Here is the caller graph for this function:

ThreadState_t CThread::ThreadState (  ) 

ThreadState return the current state of the thread

Here is the call graph for this function:


Friends And Related Function Documentation

LPVOID _THKERNEL ( LPVOID  lpvData  )  [friend]

_THKERNEL thread callback function used by CreateThread


Member Data Documentation

unsigned int CThread::m_chQue [private]

user definable member functions

unsigned int CThread::m_quePos [private]
pthread_t CThread::m_thread [private]

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

Generated on 4 Mar 2010 for TReqS by  doxygen 1.6.1