A C++ delegate implimentation