Gazebo Plugin topic map to ROS topic

I am confused on how to make plugin like gazebo_magnetometer_plugin.cpp, which publishes gazebo topic, to publish ros topic.
I was reading the section Launching Gazebo with ROS Wrappers from, and it mentions a ROS wrapper. Can anyone help me figure out where the wrapping happens? Thank you.