Encapsulates a generic message loop.
More...
#include <MessageLoop.h>
|
| virtual int | Run () |
| | Implements a generic message loop following a "template method pattern". Variant parts (GetMessage, HandleErrorAndExit, ProcessMessage) are implemented as virtual methods, so they can be overriden on inherited classes. More...
|
| |
| virtual int | GetMessage (MSG &message) |
| | Encapsulates a call to ::GetMessage without filters. More...
|
| |
| virtual bool | HandleErrorAndExit () |
| | Default implementation for handling errors. Do nothing and returns 'false'. More...
|
| |
| virtual void | ProcessMessage (MSG &message) |
| | Default implementation of message processing. Calls TranslateMessage and DispatchMessage. More...
|
| |
Encapsulates a generic message loop.
| int MessageLoop::GetMessage |
( |
MSG & |
message | ) |
|
|
virtual |
Encapsulates a call to ::GetMessage without filters.
- Parameters
-
| message | Receive information about the message retrieved. |
- Returns
- If the call was successful, returns 1. If it fails, return -1. If loop must ends, returns 0.
| bool MessageLoop::HandleErrorAndExit |
( |
| ) |
|
|
virtual |
Default implementation for handling errors. Do nothing and returns 'false'.
- Returns
- Indicates if the loop must exist: 'true' for exit. 'false' for continue.
| void MessageLoop::ProcessMessage |
( |
MSG & |
message | ) |
|
|
virtual |
Default implementation of message processing. Calls TranslateMessage and DispatchMessage.
- Parameters
-
| message | Information about the message to be processing. |
Implements a generic message loop following a "template method pattern". Variant parts (GetMessage, HandleErrorAndExit, ProcessMessage) are implemented as virtual methods, so they can be overriden on inherited classes.
- Returns
- Exit code of the loop that comes from a call to ::PostQuitMessage.
The documentation for this class was generated from the following files: