Virtual Methods or Function Pointers
Approach 1 (Virtual Function) “+” The “correct way to do it in C++ “-” A new class must be created per callback “-” Performance-wise an additional dereference through VF-Table compared to Function Pointer. Two indirect references compared to Functor solution. Approach 2 (Class with Function Pointer) “+” Can wrap a C-style function for C++ Callback … Read more