Usage of c++ mediator pattern