TC::MT::Message Class Reference
[Multithreading]

Base class of a message which can be send from one thread to another thread. More...

#include <TCMTMessage.h>

Inheritance diagram for TC::MT::Message:

Inheritance graph
[legend]
Collaboration diagram for TC::MT::Message:

Collaboration graph
[legend]

List of all members.

Public Types

enum  MsgIDs {
  MSG_ID_QUIT = 0x00000001,
  MSG_ID_START = 0x00000002,
  MSG_ID_USER_START = 0x0000ffff,
  MSG_ID_UNKNOWN = 0xffffffff
}
 Predefined message ids. More...
enum  TimeOut {
  TIMEOUT_NO = 0,
  TIMEOUT_INFINITE = 0xffffffff
}
 Predefined timeout values for getting messages. More...
enum  ReturnValue {
  MSG_RECEIVE_FAILED = 0,
  MSG_RECEIVE_TIMEOUT = 1,
  MSG_RECEIVED = 2,
  MSG_QUIT_RECEIVED = 3
}
 Return values of the Get message methodes. More...

Public Member Functions

 Message (uint32 message_id)
 Create empty message.
virtual ~Message ()
 Destruct message.
uint32 GetMessageId () const
 get the id of the message
ThreadPtr GetSenderThread ()
 get the sender thread of the message

Private Attributes

uint32 m_message_id
 global id of the message
ThreadPtr m_sender_thread
 The sender thread.


Detailed Description

Base class of a message which can be send from one thread to another thread.

Definition at line 65 of file TCMTMessage.h.


Member Enumeration Documentation

Predefined message ids.

Enumerator:
MSG_ID_QUIT  Message id for quitting a thread.
MSG_ID_START  Message id for quitting a thread.
MSG_ID_USER_START  Message id at which user specified massage ids should start.
MSG_ID_UNKNOWN  Undefined message id, for getting all messages.

Definition at line 69 of file TCMTMessage.h.

Predefined timeout values for getting messages.

Enumerator:
TIMEOUT_NO 
TIMEOUT_INFINITE 

Definition at line 78 of file TCMTMessage.h.

Return values of the Get message methodes.

Enumerator:
MSG_RECEIVE_FAILED 
MSG_RECEIVE_TIMEOUT 
MSG_RECEIVED 
MSG_QUIT_RECEIVED 

Definition at line 85 of file TCMTMessage.h.


Constructor & Destructor Documentation

TC::MT::Message::Message ( uint32  message_id  ) 

Create empty message.

virtual TC::MT::Message::~Message (  )  [virtual]

Destruct message.


Member Function Documentation

uint32 TC::MT::Message::GetMessageId (  )  const [inline]

get the id of the message

Definition at line 98 of file TCMTMessage.h.

ThreadPtr TC::MT::Message::GetSenderThread (  )  [inline]

get the sender thread of the message

Definition at line 100 of file TCMTMessage.h.


Member Data Documentation

global id of the message

Definition at line 104 of file TCMTMessage.h.

The sender thread.

Definition at line 106 of file TCMTMessage.h.


The documentation for this class was generated from the following file:

Copyright (c) Thomas Goessler 2003 - 2008