Add a CallbackObject class for registering callback functions in a static map.