CThreadEngine Class Reference

List of all members.

Public Member Functions

 ~CThreadEngine (void)
void DoCancel ()
void RunL ()
TInt RunError (TInt aError)
void StartL ()
void CreateThreadsL ()
void KillThread (TInt aThreadCount)
void SetSyncValue (TInt aValue)
TInt GetSyncValue () const

Static Public Member Functions

static CThreadEngineNewL (CThreadAppView *aView)
static CThreadEngineNewLC (CThreadAppView *aView)
static TInt ExecuteThreadOne (TAny *aPtr)
static TInt ExecuteThreadTwo (TAny *aPtr)
static TInt ExecuteThreadThree (TAny *aPtr)

Public Attributes

RMutex iMutex

Detailed Description

CThreadEngine application engine class.

Definition at line 26 of file threadengine.h.


Constructor & Destructor Documentation

CThreadEngine::~CThreadEngine ( void   ) 

Destructor

Definition at line 42 of file threadengine.cpp.


Member Function Documentation

CThreadEngine * CThreadEngine::NewL ( CThreadAppView aView  )  [static]

NewL()

Create new CThreadEngine object return a pointer to the created instance of CThreadEngine

Parameters:
aView a Pointer to CThreadAppView.

Definition at line 56 of file threadengine.cpp.

CThreadEngine * CThreadEngine::NewLC ( CThreadAppView aView  )  [static]

NewLC()

Definition at line 63 of file threadengine.cpp.

void CThreadEngine::DoCancel (  ) 

DoCancelL()

Cancels the timer.

Definition at line 197 of file threadengine.cpp.

void CThreadEngine::RunL (  ) 

RunL()

Implementation of the timer's virtual method. Check that all threads are alive and running, if not then restart them.

Definition at line 103 of file threadengine.cpp.

TInt CThreadEngine::RunError ( TInt  aError  ) 

RunError()

Handles a leave occurring in the request completion event handler RunL(). return returns always KErrNone

Definition at line 207 of file threadengine.cpp.

void CThreadEngine::StartL (  ) 

StartL()

CreateThreads and start the timer after delay.

Definition at line 85 of file threadengine.cpp.

void CThreadEngine::CreateThreadsL (  ) 

CreateThreadsL()

Initialize 3 threads and start them.

Definition at line 386 of file threadengine.cpp.

TInt CThreadEngine::ExecuteThreadOne ( TAny *  aPtr  )  [static]

ExecuteThreadOne();

Function for thread one. Thread one executes this function while it's running. param aPtr pointer to a resource.

Definition at line 293 of file threadengine.cpp.

TInt CThreadEngine::ExecuteThreadTwo ( TAny *  aPtr  )  [static]

ExecuteThreadTwo()

Function for thread two. Thread two executes this function while it's running. param aPtr pointer to a resource.

Definition at line 316 of file threadengine.cpp.

TInt CThreadEngine::ExecuteThreadThree ( TAny *  aPtr  )  [static]

ExecuteThreadThree()

Function for thread three. Thread three executes this function while it's running. param aPtr pointer to a resource.

Definition at line 339 of file threadengine.cpp.

void CThreadEngine::KillThread ( TInt  aThreadCount  ) 

KillThread()

Kill one of the threads. CreateThreadsL must have been called before this. param aThreadCount the number of the thread that should be killed (1-3).

Definition at line 235 of file threadengine.cpp.

void CThreadEngine::SetSyncValue ( TInt  aValue  ) 

SetSyncValue()

This is a thread-safe function. Set synchronized variable. param aValue Value of the variable.

Definition at line 362 of file threadengine.cpp.

TInt CThreadEngine::GetSyncValue (  )  const

GetSyncValue()

This is a thread-safe function. return value of the synchronized variable.

Definition at line 375 of file threadengine.cpp.


Generated by  doxygen 1.6.2