Template Function ros_babel_fish::invoke_for_message(const Message&, Callable&&, Args&&…)

Function Documentation

template<typename Callable, typename ...Args>
auto ros_babel_fish::invoke_for_message(const Message &msg, Callable &&f, Args&&... args)

Invokes the given functor with the given message casted to the actual type of the given message and the optionally passed additional arguments. For array messages the method is invoked with the given message casted to ArrayMessageBase. This can be used with invoke_for_array_message to call for the concrete array message type.

Returns:

The return value of the invoked method.