C/C++
message.txt
Associated article: Message Handling Without Dependencies
Tags: C/C++
Published source code accompanying the article by Anthony Williams in which he shows how you can use the full power of C++ to pass messages while maintaining type safety and avoiding monolithic functions.
Message Handling Without Dependencies
by Anthony Williams
Listing One
void handleMessage(Message* message)
{
if(Message1* m=dynamic_cast<Message1*>(message))
{
handleMessage1(m);
}
else if(Message2* m=dynamic_cast<Message2*>(message))
{
handleMessage2(m);
}
// ...
}
Listing Two
class Message
{
...


