ZeusBase-Library  2.0.4
zeus::TAbstractMainThread Class Reference

#include <AbstractMainThread.h>

Inheritance diagram for zeus::TAbstractMainThread:
zeus::TZObject zeus::IThread zeus::IZUnknown zeus::IZUnknown zeus::TConsoleMainThread

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)
 
- Public Member Functions inherited from zeus::TZObject
 TZObject ()
 
 TZObject (const TString &strName)
 
 TZObject (const IString &strName)
 
Uint getHash () const
 
TString toString () const
 
virtual TString getObjName () const
 
virtual void setObjName (const TString &name)
 

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 Member Functions inherited from zeus::TZObject
virtual ~TZObject ()
 
 TZObject (const TZObject &rObject)
 
TZObjectoperator= (const TZObject &rObject)
 
Int getRefCounter () const
 

Protected Attributes

TCriticalSectionm_rLock
 internal lock More...
 
bool m_bUseInternalDispatcher
 Flag if queue messages are dispached internally. More...
 
TThreadMessageQueuem_rQueue
 Message queue of the thread. More...
 
- Protected Attributes inherited from zeus::TZObject
Uint m_uiID
 

Static Protected Attributes

static bool m_bInterrupted = false
 Interrupted flag. More...
 

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() [1/2]

TAbstractMainThread::TAbstractMainThread ( )
protected

Creates a abstract main thread object

§ TAbstractMainThread() [2/2]

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::~TAbstractMainThread ( )
protectedvirtual

Destroys the abstract main thread object

Member Function Documentation

§ addRef()

virtual void MQUALIFIER zeus::TAbstractMainThread::addRef ( ) const
protectedvirtual
See also
IZUnknown::addRef

Reimplemented from zeus::TZObject.

§ askForInterface()

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

Reimplemented from zeus::TZObject.

§ getThreadID()

Uint MQUALIFIER zeus::TAbstractMainThread::getThreadID ( ) const
inlinevirtual
See also
IThread::getThreadID

Implements zeus::IThread.

§ isInterrupted()

bool MQUALIFIER zeus::TAbstractMainThread::isInterrupted ( ) const
inlinevirtual

§ processObject()

Retval TAbstractMainThread::processObject ( )
virtual

processes an object of the message queue

Return values
RET_NOERROR: Message successfully processed
RET_REQUEST_FAILEDNo object to process

§ registerThread()

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

registers the main thread object to the thread manager

§ release()

virtual void MQUALIFIER zeus::TAbstractMainThread::release ( ) const
protectedvirtual
See also
IZUnknown::release

Reimplemented from zeus::TZObject.

§ unregisterThread()

void TAbstractMainThread::unregisterThread ( TThreadManager rManager)
virtual

registers the main thread object to the thread manager

Member Data Documentation

§ m_bInterrupted

bool TAbstractMainThread::m_bInterrupted = false
staticprotected

Interrupted flag.

Initialisation of the interrupt flag.

§ m_bUseInternalDispatcher

bool zeus::TAbstractMainThread::m_bUseInternalDispatcher
protected

Flag if queue messages are dispached internally.

§ m_rLock

TCriticalSection& zeus::TAbstractMainThread::m_rLock
protected

internal lock

§ m_rQueue

TThreadMessageQueue& zeus::TAbstractMainThread::m_rQueue
protected

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 Tue Sep 13 2016 22:31:47