TdkThread Class Reference

#include <TdkThread.h>

Inheritance diagram for TdkThread:

TdkEventDispatcher TdkWin32GpsReaderAgent List of all members.

Public Member Functions

 TdkThread ()
 TdkThread (std::string name)
virtual ~TdkThread ()
void start ()
void interrupt ()
void join ()
std::string getName ()
bool isAlive ()

Static Public Member Functions

static void sleep (unsigned long millis)
static void finalizeEnv ()
static void checkInterruption () throw (TdkInterruptedException)
static TdkThread * getCurrentThread ()

Protected Member Functions

virtual void run ()=0

Protected Attributes

std::string name_
pthread_t runnable_

Static Protected Attributes

static int threadInitNumber_ = 0

Private Member Functions

void init (std::string name)

Static Private Member Functions

static void * startRoutine (void *thisThread)

Private Attributes

bool interrupted_
bool alive_

Static Private Attributes

static TdkThreadLocal< TdkThread > currentThread_

Constructor & Destructor Documentation

TdkThread::TdkThread (  ) 

TdkThread::TdkThread ( std::string  name  ) 

TdkThread::~TdkThread (  )  [virtual]


Member Function Documentation

void TdkThread::start (  ) 

Starts a new thread to execute the run() method.

Reimplemented in TdkWin32GpsReaderAgent.

void TdkThread::interrupt (  ) 

Interrupts this thread execution.

void TdkThread::join (  ) 

Make the caller to wait until this thread finishes.

std::string TdkThread::getName (  ) 

void TdkThread::sleep ( unsigned long  millis  )  [static]

void TdkThread::finalizeEnv (  )  [static]

TODO: O que eh isso? Quando se usa?

void TdkThread::checkInterruption (  )  throw (TdkInterruptedException) [static]

Adds an explicit interruption point to the code. If no interruption was requested, it returns immediately, otherwise it throws a TdkInterruptedException.

bool TdkThread::isAlive (  ) 

TdkThread * TdkThread::getCurrentThread (  )  [static]

virtual void TdkThread::run (  )  [protected, pure virtual]

This method should be overrided to do the actual work.

Implemented in TdkEventDispatcher, and TdkWin32GpsReaderAgent.

void * TdkThread::startRoutine ( void *  thisThread  )  [static, private]

void TdkThread::init ( std::string  name  )  [private]


Member Data Documentation

int TdkThread::threadInitNumber_ = 0 [static, protected]

Tecgraf - GIS development team

Tdk Framework

@(#) TdkThread.cpp

std::string TdkThread::name_ [protected]

pthread_t TdkThread::runnable_ [protected]

TdkThreadLocal< TdkThread > TdkThread::currentThread_ [static, private]

bool TdkThread::interrupted_ [private]

bool TdkThread::alive_ [private]


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:58 2007 for TDK by  doxygen 1.5.2