SkyGI::Thread Class Reference

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

Public Member Functions

 Thread (const String &szName)
virtual ~Thread ()
bool IsValid ()
virtual bool Kill ()
virtual int Run ()=0
virtual int Start (unsigned int uiCreateFlags=0)
virtual int Stop ()
virtual int WaitFor ()
virtual int WaitFor (int &iExitCode)
int GetPid ()
void SetFlags (unsigned int uiFlags)
void ClearFlags (unsigned int uiFlags)
unsigned int GetFlags ()

Static Public Member Functions

static void SetKey (int iKey, void *vpData)
static void * GetKey (int iKey)
static int AllocKey ()
static int _ThreadEntry (Thread *pThread, unsigned int uiFlags)

Public Attributes

Privatem

Protected Attributes

void * fpEntryFunction

Classes

class  Private

Detailed Description

Thread

Description:
This virtual base class can be used to create threads.
Note:
This thread class will not handle windows and so doesn't have a MessageQueue. If you create a window from within such a thread the Process itself will get the window owner. If you want let the thread handle windows then use the WindowThread class.
Optinally you get use an EventThread to wait for events and perform idle work.
Example:
                class MyThread : public Thread
                {
                public:
                        MyThread();
                        int Run() { printf("Hello from thread!\n");
                };

                MyThread::MyThread() : Thread("mythread") {};

                ...
                MyThread *pThread = new MyThread();
                MyThread->Start();
                ...
See also:
WindowThread
Examples:

thread.cpp.


Constructor & Destructor Documentation

Thread::Thread ( const String szName  ) 

Thread::~Thread (  )  [virtual]


Member Function Documentation

bool Thread::IsValid (  ) 

bool Thread::Kill (  )  [virtual]

Reimplemented in SkyGI::EventThread, and SkyGI::QueryViewThread.

virtual int SkyGI::Thread::Run (  )  [pure virtual]

Implemented in SkyGI::CopyThread, SkyGI::DeleteThread, SkyGI::EventThread, and SkyGI::PreviewLoader.

Examples:
thread.cpp.

int Thread::Start ( unsigned int  uiCreateFlags = 0  )  [virtual]

int Thread::Stop (  )  [virtual]

int Thread::WaitFor (  )  [virtual]

int Thread::WaitFor ( int &  iExitCode  )  [virtual]

int Thread::GetPid (  ) 

void Thread::SetFlags ( unsigned int  uiFlags  ) 

void Thread::ClearFlags ( unsigned int  uiFlags  ) 

unsigned int Thread::GetFlags (  ) 

void Thread::SetKey ( int  iKey,
void *  vpData 
) [static]

void * Thread::GetKey ( int  iKey  )  [static]

int Thread::AllocKey (  )  [static]

int Thread::_ThreadEntry ( Thread pThread,
unsigned int  uiFlags 
) [static]


Member Data Documentation

Private* SkyGI::Thread::m

Reimplemented in SkyGI::WindowThread, and SkyGI::EventThread.

void* SkyGI::Thread::fpEntryFunction [protected]


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