Brunot
Loading...
Searching...
No Matches
Messaging.h File Reference
Include dependency graph for Messaging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sys::Messaging
 Component that is responsible for managing the gameplay board, where cards are placed by Players. More...

Namespaces

namespace  sys
 the type of elements in a basic_json container

Macros

#define TH_CONNECT_MESSAGE(event)
 Binds an event to a class.

Macro Definition Documentation

◆ TH_CONNECT_MESSAGE

#define TH_CONNECT_MESSAGE ( event)
Value:
messaging->connect< TH_CURRENT_CLASS >( #event , & TH_CURRENT_CLASS ::receive##event ,"receive" #event ,this);
#define TH_CURRENT_CLASS

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
    eventthe name of the event you want to connect