Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends
CThread Class Reference

#include <Thread.h>

Inheritance diagram for CThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

CMutexClass m_mutex

Private Member Functions

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

Private Attributes

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

Friends

LPVOID _THKERNEL (LPVOID lpvData)

Detailed Description

Definition at line 166 of file Thread.h.


Constructor & Destructor Documentation

CThread::CThread ( void  )

CThread instanciates thread object and starts thread.

Definition at line 371 of file Thread.cpp.

CThread::~CThread ( void  )

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

Definition at line 680 of file Thread.cpp.


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.

Definition at line 426 of file Thread.cpp.

BOOL CThread::Event ( LPVOID  lpvData = NULL)

Event wakes up a thread to process data

Definition at line 248 of file Thread.cpp.

BOOL CThread::Event ( CTask pvTask)

Definition at line 216 of file Thread.cpp.

Definition at line 233 of file Thread.h.

unsigned int CThread::GetEventsPending ( )

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

Definition at line 352 of file Thread.cpp.

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

Definition at line 225 of file Thread.h.

KernelProcess routes thread activity

Definition at line 295 of file Thread.cpp.

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

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

Reimplemented in CIncrementThread.

Definition at line 183 of file Thread.cpp.

BOOL CThread::OnTask ( ) [virtual]

OnTask overloaded implementation of OnTask that takes no arguments

Reimplemented in CRecognizerThread, CTomGineThread, CIncrementThread, Tracking::CameraThread, CCameraThread, and Tracking::TrackerThread.

Definition at line 207 of file Thread.cpp.

BOOL CThread::PingThread ( DWORD  dwTimeout = 0)

PingThread used to determine if a thread is running

Definition at line 712 of file Thread.cpp.

BOOL CThread::Pop ( ) [private]

Pop move an object from the input que to the processor

Definition at line 471 of file Thread.cpp.

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

Push place a data object in the threads que

Definition at line 447 of file Thread.cpp.

void CThread::SetIdle ( DWORD  dwIdle = 100)

SetIdle changes the threads idle interval

Definition at line 558 of file Thread.cpp.

void CThread::SetPriority ( DWORD  dwPriority = 0)

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

Definition at line 279 of file Thread.cpp.

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.

Definition at line 502 of file Thread.cpp.

Start start thread

Definition at line 572 of file Thread.cpp.

void CThread::Stop ( )

Stop stop thread

Definition at line 529 of file Thread.cpp.

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

Definition at line 250 of file Thread.h.

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

Definition at line 237 of file Thread.h.

ThreadState return the current state of the thread

Definition at line 664 of file Thread.cpp.


Friends And Related Function Documentation

LPVOID _THKERNEL ( LPVOID  lpvData) [friend]

_THKERNEL thread callback function used by CreateThread

Definition at line 119 of file Thread.cpp.


Member Data Documentation

Definition at line 175 of file Thread.h.

unsigned int CThread::m_chQue [private]

Definition at line 183 of file Thread.h.

Definition at line 181 of file Thread.h.

Definition at line 188 of file Thread.h.

Definition at line 198 of file Thread.h.

Definition at line 173 of file Thread.h.

Definition at line 182 of file Thread.h.

Definition at line 185 of file Thread.h.

user definable member functions

Definition at line 208 of file Thread.h.

unsigned int CThread::m_quePos [private]

Definition at line 184 of file Thread.h.

Definition at line 190 of file Thread.h.

Definition at line 186 of file Thread.h.

pthread_t CThread::m_thread [private]

Definition at line 179 of file Thread.h.

Definition at line 189 of file Thread.h.


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


blort
Author(s): Michael Zillich, Thomas Mörwald, Johann Prankl, Andreas Richtsfeld, Bence Magyar (ROS version)
autogenerated on Thu Jan 2 2014 11:38:26