#include <TCMTThread.h>


Public Types | |
| enum | ThreadPriority { PRIORITY_LOWEST, PRIORITY_LOW, PRIORITY_NORMAL, PRIORITY_HIGH, PRIORITY_HIGHEST } |
| The priorities we can give the thread. More... | |
| enum | ThreadState { STATE_NEW, STATE_RUNNING, STATE_TERMINATED } |
| enumeration the different states the thread can have More... | |
Public Member Functions | |
| virtual | ~Thread () |
| virtual bool | Start (ThreadObjectPtr object_to_start)=0 |
| Executes the Run method of the ThreadObject in the context of the thread. | |
| virtual bool | Join ()=0 |
| Join causes the calling thread to wait for the threads completion,. | |
| virtual bool | IsRunning () const =0 |
| virtual bool | IsTerminated () const =0 |
| virtual bool | SetPriority (ThreadPriority priority)=0 |
| Set the priority of the thread. | |
| virtual ThreadPriority | GetPriority () const =0 |
| virtual bool | SendThreadMessage (MessagePtr message)=0 |
| Sending Messages between threads. | |
| virtual Message::ReturnValue | WaitThreadMessage (MessagePtr &message)=0 |
| Wait for a message received in this thread. | |
| virtual Message::ReturnValue | WaitThreadMessage (MessagePtr &message, uint32 timeout)=0 |
| Wait for a message received in this thread. | |
Definition at line 67 of file TCMTThread.h.
enumeration the different states the thread can have
| STATE_NEW | thread object exists but thread hasn't started yet. |
| STATE_RUNNING | thread is running. |
| STATE_TERMINATED | thread has terminated but storage has not been reclaimed (i.e. waiting to be joined). |
Definition at line 81 of file TCMTThread.h.
| virtual TC::MT::Thread::~Thread | ( | ) | [inline, virtual] |
Definition at line 94 of file TCMTThread.h.
| virtual bool TC::MT::Thread::Start | ( | ThreadObjectPtr | object_to_start | ) | [pure virtual] |
Executes the Run method of the ThreadObject in the context of the thread.
| object_to_start | Pointer to the object which to start |
| virtual bool TC::MT::Thread::Join | ( | ) | [pure virtual] |
Join causes the calling thread to wait for the threads completion,.
| virtual bool TC::MT::Thread::IsRunning | ( | ) | const [pure virtual] |
| virtual bool TC::MT::Thread::IsTerminated | ( | ) | const [pure virtual] |
| virtual bool TC::MT::Thread::SetPriority | ( | ThreadPriority | priority | ) | [pure virtual] |
Set the priority of the thread.
| virtual ThreadPriority TC::MT::Thread::GetPriority | ( | ) | const [pure virtual] |
| virtual bool TC::MT::Thread::SendThreadMessage | ( | MessagePtr | message | ) | [pure virtual] |
Sending Messages between threads.
Send a message to specified thread. The message can be received with WaitThreadMessage The receiver thread has to delete the message
| message | The message to send to the thread |
| virtual Message::ReturnValue TC::MT::Thread::WaitThreadMessage | ( | MessagePtr & | message | ) | [pure virtual] |
Wait for a message received in this thread.
| message | The message received or 0 if no |
| virtual Message::ReturnValue TC::MT::Thread::WaitThreadMessage | ( | MessagePtr & | message, | |
| uint32 | timeout | |||
| ) | [pure virtual] |
Wait for a message received in this thread.
| message | The message received or 0 if no | |
| timeout | Maximum time to wait for the message in milliseconds |