NLMISC::IThread Class Reference

Thread base interface, must be implemented for all OS. More...

#include <thread.h>

List of all members.

Public Member Functions

virtual ~IThread ()
virtual void start ()=0
virtual bool isRunning ()=0
virtual void terminate ()=0
virtual void wait ()=0
virtual IRunnablegetRunnable ()=0
 Return a pointer to the runnable object.
virtual bool setCPUMask (uint64 cpuMask)=0
 Set the CPU mask of this thread.
virtual uint64 getCPUMask ()=0
 Get the CPU mask of this thread.
virtual std::string getUserName ()=0
 Get the thread user name.

Static Public Member Functions

static IThreadcreate (IRunnable *runnable, uint32 stackSize=0)
 Create a new thread.
static IThreadgetCurrentThread ()
 Return a pointer on the current thread.

Detailed Description

Thread base interface, must be implemented for all OS.

Author:
Vianney Lecroart
Nevrax France
Date:
2000

Definition at line 84 of file thread.h.


Constructor & Destructor Documentation

virtual NLMISC::IThread::~IThread (  )  [inline, virtual]

Definition at line 101 of file thread.h.


Member Function Documentation

IThread * NLMISC::IThread::create ( IRunnable runnable,
uint32  stackSize = 0 
) [static]

Create a new thread.

Implemented in the derived class.

Definition at line 38 of file p_thread.cpp.

Referenced by NLMISC::CTaskManager::CTaskManager(), NLNET::CStdinMonitorSingleton::init(), NL3D::CZoneLighter::light(), NL3D::CZoneLighter::lightShapes(), and NLMISC::CCoTask::start().

virtual uint64 NLMISC::IThread::getCPUMask (  )  [pure virtual]

Get the CPU mask of this thread.

Thread must have been started before. The mask should be a subset of the CPU mask returned by IProcess::getCPUMask() thread process. Not implemented under Linux.

Referenced by NL3D::CZoneLighter::light().

IThread * NLMISC::IThread::getCurrentThread (  )  [static]

Return a pointer on the current thread.

Implemented in the derived class. Not implemented under Linux.

Definition at line 49 of file p_thread.cpp.

References NLMISC::CurrentThread().

Referenced by NL3D::CZoneLighter::light().

virtual IRunnable* NLMISC::IThread::getRunnable (  )  [pure virtual]

Return a pointer to the runnable object.

Referenced by NLNET::CBufServer::~CBufServer().

virtual std::string NLMISC::IThread::getUserName (  )  [pure virtual]

Get the thread user name.

Notimplemented under linux, under windows return the name of the logon user.

virtual bool NLMISC::IThread::isRunning (  )  [pure virtual]
virtual bool NLMISC::IThread::setCPUMask ( uint64  cpuMask  )  [pure virtual]

Set the CPU mask of this thread.

Thread must have been started before. The mask must be a subset of the CPU mask returned by IProcess::getCPUMask() thread process. Not implemented under Linux.

Referenced by NL3D::CZoneLighter::light(), and setCPUMask().

virtual void NLMISC::IThread::start (  )  [pure virtual]
virtual void NLMISC::IThread::terminate (  )  [pure virtual]
virtual void NLMISC::IThread::wait (  )  [pure virtual]

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

Generated on Thu Jan 7 08:30:19 2010 for NeL by  doxygen 1.6.1