- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Threading::IThread Interface Reference

Inheritance diagram for Exponent::Threading::IThread:

List of all members.

## Detailed Description

A wrapper around a cross platform thread.

Date:
  13/01/2006

Author:
  Paul Chana

Version:
  1.0.0 Initial version

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  IThread.hpp,v 1.6 2007/02/08 21:06:44 paul Exp

Definition at line 38 of file IThread.hpp.

## Public Types

- enum EThreadPriority {
  e_highPriority = 0,
  e_normalPriority,
  e_lowPriority
  }
    Priority of the thread. More...

## Public Member Functions

- virtual IThread::SThreadHandle * getThreadHandle ()=0
- virtual IThreadListener * getThreadListener ()=0
- virtual IThread::EThreadPriority getThreadPriority () const=0
- virtual bool isThreadActive () const=0
- IThread ()
- virtual void registerThreadListener (IThreadListener *listener)=0
- virtual bool runThread ()=0
- virtual void setCriticalSection (CCriticalSection *criticalSection)=0
- virtual void setThreadHandle (IThread::SThreadHandle *threadHandle)=0
- virtual void setThreadPriority (const IThread::EThreadPriority priority)=0
- virtual void sleepThread (const long timeInMilliseconds)=0
- virtual void stopThread ()=0
- virtual ~IThread ()

## Classes

- struct SThreadHandle
    Cross platform thread handle. More...

## Member Enumeration Documentation

enum Exponent::Threading::IThread::EThreadPriority

Priority of the thread.

Enumerator:

  e_highPriority | High priority, eg audio
  e_normalPriority | Normal priority
  e_lowPriority | Low priority thread

Definition at line 48 of file IThread.hpp.

## Constructor & Destructor Documentation

Exponent::Threading::IThread::IThread | ( |  | ) | `[inline]`

Construction

Definition at line 75 of file IThread.hpp.

virtual Exponent::Threading::IThread::~IThread | ( |  | ) | `[inline, virtual]`

Destruction

Definition at line 80 of file IThread.hpp.

## Member Function Documentation

virtual IThread::SThreadHandle* Exponent::Threading::IThread::getThreadHandle | ( |  | ) | `[pure virtual]`

Get the thread handle

Return values:

  | IThread::SThreadHandle | * Handle to the thread

Implemented in Exponent::Threading::CThread.

virtual IThreadListener* Exponent::Threading::IThread::getThreadListener | ( |  | ) | `[pure virtual]`

Get the thread listener

Return values:

  | IThreadListener* | The thread listener

Implemented in Exponent::Threading::CThread.

virtual IThread::EThreadPriority Exponent::Threading::IThread::getThreadPriority | ( |  | ) | const`[pure virtual]`

Get the thread priority

Returns:
  IThread::EThreadPriority The thread priority

Implemented in Exponent::Threading::CThread.

virtual bool Exponent::Threading::IThread::isThreadActive | ( |  | ) | const`[pure virtual]`

Is thread active

Return values:

  | bool | True if thread is running, false otherwise

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::registerThreadListener | ( | IThreadListener * | listener | ) | `[pure virtual]`

Register the thread listener

Parameters:

  | listener | The thread listener

Implemented in Exponent::Threading::CThread.

virtual bool Exponent::Threading::IThread::runThread | ( |  | ) | `[pure virtual]`

Do the actual process. Normally in a threaded object you would overload this function and do some interesting stuff inside

Return values:

  | bool | True if you completed properly, false otherwise

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::setCriticalSection | ( | CCriticalSection * | criticalSection | ) | `[pure virtual]`

Set the critical section

Parameters:

  | criticalSection | The ciritical setion

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::setThreadHandle | ( | IThread::SThreadHandle * | threadHandle | ) | `[pure virtual]`

Set the Thread handle

Parameters:

  | threadHandle | The handle to the thread You now own this pointer

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::setThreadPriority | ( | const IThread::EThreadPriority | priority | ) | `[pure virtual]`

Set the thread priority

Parameters:

  | priority | The thread priority

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::sleepThread | ( | const long | timeInMilliseconds | ) | `[pure virtual]`

Sleep the thread

Parameters:

  | timeInMilliseconds | The sleep time in msec

Implemented in Exponent::Threading::CThread.

virtual void Exponent::Threading::IThread::stopThread | ( |  | ) | `[pure virtual]`

Stop the thread

Note:
  This is a forced termination, upon reciept of this message you must terminate as quickly as possible

Implemented in Exponent::Threading::CThread.