ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can use Boost.Bind to binds methods and use them as callbacks.

Callbacks can be changed at runtime (the API usually allows it but in the worst case you can destroy and recreate a publisher/subscriber) so it is not necessary to use complex dispatch methods. Of course, if it benefits code readability, using virtual methods is good too :)