CAST II Game Engine |
||||||||
![]() |
MAIN | FEATURES | SCREENSHOTS | FORUMS | MANUAL | DOWNLOADS | CONTACTS | |
type TMessageSubsystem = class
The class provides the possibility to handle asynchronous messages.
Message handlers can generate other asynchronous messages which will be handled during next handling cycle. If you use this class there is no need to call any methods of TMessagePool.
![]() | procedure Add(const Msg: TMessage); |
![]() | procedure BeginHandle; |
![]() | procedure EndHandle; |
![]() | function ExtractMessage(out Msg: TMessage): Boolean; |
![]() | procedure Add(const Msg: TMessage); |
Add an asynchronous message to the queue
![]() | procedure BeginHandle; |
Locks current message queue. Should be called before message handling cycle.
All asynchronous messages generated during handling will be available during next handling cycle.
Calls TMessagePool.BeginHandle so application has no need to call it.
![]() | procedure EndHandle; |
Should be called after handling cycle. Calls TMessagePool.EndHandle so application has no need to call it
![]() | function ExtractMessage(out Msg: TMessage): Boolean; |
Extracts a message from the queue if any, places it to Msg and returns True if there was a message in queue. Otherwise returns False and nil in Msg. Should be called only between BeginHandle and EndHandle calls.
|
Last modified: Jan 6, 2010 |