OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::ThreadModule Class Reference

#include <ThreadModule.h>

Inheritance diagram for ot::ThreadModule:

Inheritance graph
[legend]
Collaboration diagram for ot::ThreadModule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ThreadModule ()
virtual ~ThreadModule ()
virtual void start ()
virtual void close ()

Protected Member Functions

void lock ()
void unlock ()
virtual void run ()

Static Protected Member Functions

static void thread_func (void *data)

Protected Attributes

void * thread
ACE_Thread_Mutex * mutex

Detailed Description

Definition at line 70 of file ThreadModule.h.


Constructor & Destructor Documentation

ot::ThreadModule::ThreadModule (  ) 

constructor

Definition at line 76 of file ThreadModule.cxx.

References mutex.

ot::ThreadModule::~ThreadModule (  )  [virtual]

destructor

Definition at line 83 of file ThreadModule.cxx.

References mutex.


Member Function Documentation

void ot::ThreadModule::close (  )  [virtual]

closes the module.

In this implementation it stops the thread. Be sure to call this method from your subclasses close method to stop the thread !

Reimplemented from ot::Module.

Reimplemented in ot::ARTDataTrackerModule, ot::ARToolKitModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::JoystickModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::OpenVideoModule, ot::SpaceMouseModule, ot::UltraTrakModule, and ot::TCPModule.

Definition at line 101 of file ThreadModule.cxx.

References thread.

Referenced by ot::GPSModule::close().

virtual void ot::ThreadModule::run (  )  [inline, protected, virtual]

the work method for the module thread.

This is executed by the new module thread. In this class it does nothing but subclasses should override it to add their implementation.

Reimplemented in ot::ARTDataTrackerModule, ot::ARToolKitModule, ot::DynaSightModule, ot::FastTrakModule, ot::FOBModule, ot::GPSModule, ot::JoystickModule, ot::LinmouseModule, ot::MagicYModule, ot::MulticastInputModule, ot::OpenVideoModule, ot::SpaceMouseModule, ot::UltraTrakModule, and ot::TCPModule.

Definition at line 93 of file ThreadModule.h.

void ot::ThreadModule::start (  )  [virtual]

static void ot::ThreadModule::thread_func ( void *  data  )  [inline, static, protected]

static thread function passed to the actual thread.

This calls then run on the right instance. Do not use this yourself.

Definition at line 97 of file ThreadModule.h.

Referenced by start().


Member Data Documentation

ACE_Thread_Mutex* ot::ThreadModule::mutex [protected]

Mutex to implement lock, unlock behavior.

Definition at line 79 of file ThreadModule.h.

Referenced by lock(), ThreadModule(), unlock(), and ~ThreadModule().

void* ot::ThreadModule::thread [protected]

handle to module specific thread.

This is a little bit tricky as we don't use the ACE definition but the same type.

Definition at line 76 of file ThreadModule.h.

Referenced by close(), and start().


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

copyright (c) 2006 Graz University of Technology