XFcThreadObject class Reference

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcThreadObject Class Reference

Object that runs in its own thread. More...

Collaboration diagram for XFcThreadObject:

[legend]
List of all members.

## Public Member Functions

XFCIMPORT INT32 | waitDeath ()
| Waits the thread to end and returns the exit code.
XFCIMPORT INT | create ()
| Creates thread and starts running it immediately.
virtual XFCIMPORT | ~XFcThreadObject ()
| Virtual destructor.

## Protected Member Functions

XFCIMPORT | XFcThreadObject ()
| Protected constructor.
virtual INT32 | run ()=0
| Thread function (this is where the thread runs).

## Static Protected Member Functions

XFCIMPORT INT32 | threadEntry (void *)
| Thread creation.

## Protected Attributes

XFcThread * | mThread
| Actual thread object.

## Private Member Functions

void | runThread ()
| Executes the thread.
void | getTls ()
| Stores handle to the system core of the current thread.
void | setTls ()
| Sets the handle to the system core on the current thread.

## Private Attributes

XFcSystemCore * | mXfc
| Handle to the system core for this thread.

## Detailed Description

Object that runs in its own thread.

The implementor of the derived class is supposed to provide the implementation for the pure virtual run method. The public interface of XFcThreadObject is available to external agents so that they can manage the state of XFcThreadObject object.

See also:
  XFcThreadObject::run

Note:
  It is possible that some platforms do not have thread support.

  Using threads generally slows down some systems.

## Constructor & Destructor Documentation

virtual XFCIMPORT XFcThreadObject::~XFcThreadObject | ( |  | ) | `[virtual]`

| Virtual destructor.

XFCIMPORT XFcThreadObject::XFcThreadObject | ( |  | ) | `[protected]`

| Protected constructor.

## Member Function Documentation

XFCIMPORT INT XFcThreadObject::create | ( |  | ) |

| Creates thread and starts running it immediately.

void XFcThreadObject::getTls | ( |  | ) | `[private]`

Stores handle to the system core of the current thread.

Note:
  Implementation and need for this operation is platform specific.

virtual INT32 XFcThreadObject::run | ( |  | ) | `[protected, pure virtual]`

Thread function (this is where the thread runs).

Override this to implement the thread's functionality.

Returns:
  exit code for this thread.

void XFcThreadObject::runThread | ( |  | ) | `[private]`

| Executes the thread.

void XFcThreadObject::setTls | ( |  | ) | `[private]`

Sets the handle to the system core on the current thread.

Note:
  Implementation and need for this operation is platform specific.

XFCIMPORT INT32 XFcThreadObject::threadEntry | ( | void * |  | ) | `[static, protected]`

| Thread creation.

XFCIMPORT INT32 XFcThreadObject::waitDeath | ( |  | ) |

| Waits the thread to end and returns the exit code.

## Member Data Documentation

XFcThread* XFcThreadObject::mThread`[protected]`

| Actual thread object.

XFcSystemCore* XFcThreadObject::mXfc`[private]`

Handle to the system core for this thread.

Note:
  Use and need for this field is platform specific.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch