Dispatcher - An Event Handling in C++