SkyGI::EventThread Class Reference

Inheritance diagram for SkyGI::EventThread:
[legend]
Collaboration diagram for SkyGI::EventThread:
[legend]
List of all members.

Public Member Functions

 EventThread (const String &szName)
virtual ~EventThread ()
int Run ()
virtual bool Work ()
virtual bool HandleMessage (const Message *pMessage)
EventQueueGetEventQueue ()
virtual bool Kill ()

Public Attributes

Privatem

Classes

class  Private

Detailed Description

EventThread

Description:
An event thread can be used to perform (idle) work while still handling messages directed to this thread and other events. Optionally you can also register additonal EventSources using EventThread::GetEventQueue
Note:
Example:
 class MyEventThread : public EventThread
 {
 public:
        MyEventThread(const String& szName);
        bool         HandleMessage(const Message *pMessage);
        bool Work();
 
 };
 
 MyEventThread::MyEventThread(const String& szName) : EventThread(szName)
 {
 }
 
 bool MyEventThread::Work()
 {
        // Do Idle work here. If more work should be done, return true, else false. If false is returned to EventThread will wait
        // for messages and block this thread. If true is returned the EventThread will only process a waiting message (if there is one)
        // and call this work function again.
 }
 
 bool MyEventThread::HandleMessage(const Message *pMessage)
 {
        // handle message directed to this thread
 
        return EventThread::HandleMessage(pMessage);
 }
See also:
Thread, WindowThread, EventThread::GetEventQueue, EventQueue
Examples:

eventthread.cpp.


Constructor & Destructor Documentation

EventThread::EventThread ( const String szName  ) 

EventThread::~EventThread (  )  [virtual]


Member Function Documentation

int EventThread::Run (  )  [virtual]

Implements SkyGI::Thread.

bool EventThread::Work (  )  [virtual]

Examples:
eventthread.cpp.

bool EventThread::HandleMessage ( const Message pMessage  )  [virtual]

Examples:
eventthread.cpp.

EventQueue * EventThread::GetEventQueue (  ) 

bool EventThread::Kill (  )  [virtual]

Reimplemented from SkyGI::Thread.

Reimplemented in SkyGI::QueryViewThread.


Member Data Documentation

Private* SkyGI::EventThread::m

Reimplemented from SkyGI::Thread.


Generated on Thu Dec 13 18:14:22 2007 for SkyGI by  doxygen 1.5.1-p1