C++ generic message dispatcher. Message receivers are determined by the type of the message sent.
- functions
- methods
- static methods
- lambdas
- const methods :<
- type_info.h uses VS only __FUNCSIG__ makro
- publisher-subscriber pattern only
void receive_value(int message)
{
std::cout << "function received value_message: " << message << '\n';
}
int main()
{
pk::message_dispatcher::bind(receive_value);
pk::message_dispatcher::signal(4);
pk::message_dispatcher::unbind(receive_value);
}