zeus::TAbstractMainThread Class Reference

#include <AbstractMainThread.h>

Inheritance diagram for zeus::TAbstractMainThread:

zeus::TZObject zeus::IThread zeus::IZUnknown zeus::IZUnknown zeus::TConsoleMainThread

List of all members.

Public Member Functions

virtual bool MQUALIFIER isInterrupted () const
virtual Uint MQUALIFIER getThreadID () const
virtual Retval processObject ()
virtual void registerThread (TThreadManager &rManager, bool bUseInternalDispatcher)
virtual void unregisterThread (TThreadManager &rManager)

Protected Member Functions

 TAbstractMainThread ()
 TAbstractMainThread (TThreadMessageQueue &rQueue)
virtual ~TAbstractMainThread ()
virtual Retval MQUALIFIER askForInterface (Uint uiInterfaceID, IZUnknown *&rpIface)
virtual void MQUALIFIER addRef () const
virtual void MQUALIFIER release () const

Protected Attributes

TCriticalSectionm_rLock
 internal lock
bool m_bUseInternalDispatcher
 Flag if queue messages are dispached internally.
TThreadMessageQueuem_rQueue
 Message queue of the thread.

Static Protected Attributes

static bool m_bInterrupted = false
 Interrupted flag.


Detailed Description

this class implements the functionality of a main thread. This class can not be used as an object. Subclasses are TConsoleMainThread, TBorlandMainThread etc.

Constructor & Destructor Documentation

TAbstractMainThread::TAbstractMainThread (  )  [protected]

Creates a abstract main thread object

TAbstractMainThread::TAbstractMainThread ( TThreadMessageQueue rQueue  )  [protected]

Creates a abstract main thread object, using a specific queue.

Note:
: the queue is owned by the Main thread

TAbstractMainThread::~TAbstractMainThread (  )  [protected, virtual]

Destroys the abstract main thread object


Member Function Documentation

bool MQUALIFIER zeus::TAbstractMainThread::isInterrupted (  )  const [inline, virtual]

See also:
IThread::isInterrupted

Implements zeus::IThread.

Uint MQUALIFIER zeus::TAbstractMainThread::getThreadID (  )  const [inline, virtual]

See also:
IThread::getThreadID

Implements zeus::IThread.

Retval TAbstractMainThread::processObject (  )  [virtual]

processes an object of the message queue

Return values:
RET_NOERROR : Message successfully processed
RET_REQUEST_FAILED,: No object to process

void TAbstractMainThread::registerThread ( TThreadManager rManager,
bool  bUseInternalDispatcher 
) [virtual]

registers the main thread object to the thread manager

void TAbstractMainThread::unregisterThread ( TThreadManager rManager  )  [virtual]

registers the main thread object to the thread manager

virtual Retval MQUALIFIER zeus::TAbstractMainThread::askForInterface ( Uint  uiInterfaceID,
IZUnknown *&  rpIface 
) [protected, virtual]

Reimplemented from zeus::TZObject.

virtual void MQUALIFIER zeus::TAbstractMainThread::addRef (  )  const [protected, virtual]

See also:
IZUnknown::addRef

Reimplemented from zeus::TZObject.

virtual void MQUALIFIER zeus::TAbstractMainThread::release (  )  const [protected, virtual]

See also:
IZUnknown::release

Reimplemented from zeus::TZObject.


Member Data Documentation

bool TAbstractMainThread::m_bInterrupted = false [static, protected]

Interrupted flag.

Initialisation of the interrupt flag.

internal lock

Flag if queue messages are dispached internally.

Message queue of the thread.


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:33 2009