When creating a PiPo wrapping other PiPos, it is impossible to override the base "setReceiver" method without a cast when using polymorphism, because it is not pure virtual.
Possible solution : add a pure virtual "connect(PiPo *receiver)" method that would in most cases simply call "setReceiver(receiver)" in its implementation, and in more complex cases allow more flexibility to deal with the connection process ?
There could even be an intermediary "SimplePiPo" class from which all simple PiPos could inherit, implementing this default behaviour.
This now concerns the pipo-sdk submodule, and has been solved by making setReceiver virtual in PiPo base class without generating any noticeable bug.
Closing this issue.
When creating a PiPo wrapping other PiPos, it is impossible to override the base "setReceiver" method without a cast when using polymorphism, because it is not pure virtual. Possible solution : add a pure virtual "connect(PiPo *receiver)" method that would in most cases simply call "setReceiver(receiver)" in its implementation, and in more complex cases allow more flexibility to deal with the connection process ? There could even be an intermediary "SimplePiPo" class from which all simple PiPos could inherit, implementing this default behaviour.