Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can you override a C++ message callback

I have a Parent() class that subscribes to a message /foo with a method messageCallback.

Can a derived class Child : public Parent override the messageCallback method to get notified each time a new /foo message arrives?

The alternative I've come up with is to have both Parent and Child subscribe to the /foo message and do separate things in their separate callbacks.