Title says it all. I know they can be used with
ProcessorWrapper perfectly fine since they have method signatures matching
ProcessorBase without actually inheriting it, but why not just inherit from
ProcessorBase for compile-time override safety? I’m guessing it was done to avoid vtable lookups, but since the overridden methods are pure virtual I’m (fairly) certain there wouldn’t be any anyway.
Is inheriting from
ProcessorBase something we end users should be avoiding too?
(Pinging @IvanC via tagging)
EDIT: Answered my own question somewhat.
ProcessorWrapper exists to conform a class to the
ProcessorBase interface via static polymorphism. This is how all the factory processors appear to be used in practice. While I guess that’s handy, I still don’t really get why that route was chosen. Does it really make that huge of a difference performance wise vs. overriding a pure virtual method…?