Create callback function on c++ driver class.