To be honest this is really strange to me as a C++ developer. To me either approach (overriding OR method registration) would be sufficient to plug in my custom code. Why do I need to override AND register the overriden method into the cocos system?
The virtual methods on Layer is something from older engine that exists for backward compatibility. It’s effectively deprecated going forward, as I understand it.
The event listener is the newer system that allows getting touch events for any node, not just a layer. Also the callbacks can be supplied with any function that matches the signature below. This also allows you to use a lambda if you want to supply the concrete event method in-place within your code. This also means you could add a non-virtual method of any name that doesn’t already exist in your class or any of its base class’ virtual methods.