Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

zeus::TAbstractMainThread Class Reference

#include <AbstractMainThread.h>

Inheritance diagram for zeus::TAbstractMainThread:
zeus::TZObject zeus::IThread zeus::IZUnknown zeus::IZUnknown TQTMainThread 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, bool bAdoptPointer)
virtual ~TAbstractMainThread ()
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, 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,
bool  bAdoptPointer 
) [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

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

Reimplemented from zeus::TZObject.

virtual Retval MQUALIFIER zeus::TAbstractMainThread::askForInterface ( const InterfaceID rInterfaceID,
IZUnknown *&  rpIface 
) [protected, virtual]
See also:
IZUnknown::askForInterface

Reimplemented from zeus::TZObject.

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

Implements zeus::IThread.

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

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

Reimplemented in TQTMainThread.

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

Reimplemented from zeus::TZObject.

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

registers the main thread object to the thread manager

Reimplemented in TQTMainThread.


Member Data Documentation

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

Interrupted flag.

Initialisation of the interrupt flag.

Flag if queue messages are dispached internally.

internal lock

Message queue of the thread.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:32