Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CGenericTask Class Reference

CGenericTask. More...

#include <GenericTask.h>

Inheritance diagram for CGenericTask:

CAddressBook CClient CDispatcherTask CGUITranslator CPlayer CTServ CGameModule CLocalPlayer CNetworkPlayer CBackgammonGM COthelloGM CStrategoGM CTicTacToeGM CAIModule CAIPlayer CAIPlayer CHumanPlayer CTournamentPlayer List of all members.

Public Member Functions

 CGenericTask ()
 CGenericTask.
virtual ~CGenericTask ()
 ~CGenericTask
bool SendMessage (CEID ID, void *pMessage)
 SendMessage.
void Start ()
 StartTask.
void EndTask ()
 EndTask.
bool IsRunning ()
 IsRunning.
void Sleep (uint32 msec)
 Sleep.

Protected Member Functions

bool ReadMessage (CEID &ID, void *&pMessage)
 ReadMessage.

Detailed Description

CGenericTask.

Description: A generic task class to be derived from to simplify creating threads.

Limitations: NONE


Constructor & Destructor Documentation

CGenericTask::CGenericTask  )  [inline]
 

CGenericTask.

Description: Constructor for the CGenericTask class.

Limitations: NONE

CGenericTask::~CGenericTask  )  [inline, virtual]
 

~CGenericTask

Description: Deconstructor for the CGenericTask class.

Limitations: NONE


Member Function Documentation

void CGenericTask::EndTask  )  [inline]
 

EndTask.

Description: This function causes a thread to terminate.

Limitations: Derived classes must periodically check the m_bTerminate attribute for the termination flag.

bool CGenericTask::IsRunning  )  [inline]
 

IsRunning.

Description: This function checks whether the thread has terminated.

Limitations: None

bool CGenericTask::ReadMessage CEID ID,
void *&  pMessage
[protected]
 

ReadMessage.

Description: Read a message from the message queue

Parameters:
ID,: Message ID
pMessage,: Message
Returns:
false if queue is empty
Limitations: Queue size is limited

bool CGenericTask::SendMessage CEID  ID,
void *  pMessage
 

SendMessage.

Description: Sends a message to this particular task

Parameters:
ID,: Message identifier
pMessage,: pointer to a message
Returns:
false if queue is full
Limitations: Queue size is limited

void CGenericTask::Sleep uint32  msec  ) 
 

Sleep.

Description: Makes the thread sleep for given milliseconds

Parameters:
msec,: Milliseconds that the thread should sleep.
Limitations: NONE

void CGenericTask::Start  ) 
 

StartTask.

Description: Creates the thread for the class to run in

Limitations: NONE


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo