Contextual Inversion of Control (IoC) framework for C++