add CppEvents code from http://code.google.com/p/cpp-events/