Go to the source code of this file.
|
| namespace | sys |
| | the type of elements in a basic_json container
|
◆ TH_CONNECT_MESSAGE
| #define TH_CONNECT_MESSAGE |
( |
| event | ) |
|
Value:messaging->connect<
TH_CURRENT_CLASS >( #event , & TH_CURRENT_CLASS ::receive##event ,
"receive" #event ,
this);
Binds an event to a class.
- must be done when messaging system is already got, and a pointer to it is in variable messaging
- TH_CURRENT_CLASS must be defined as the current class, for example #define TH_CURRENT_CLASS scoring
- you must have a member function called receive{event name} properly setup (take in event pointer, returns a message)
- Parameters
-
| event | the name of the event you want to connect |