请有人向我解释一下这个运算符在 C++ 中的函数中做了什么?
class simplecanny
{
ros::NodeHandle nh_;
ros::NodeHandle n;
ros::Publisher pub ;
image_transport::ImageTransport it_;
image_transport::Subscriber image_sub_; //image subscriber
image_transport::Publisher image_pub_; //image publisher(we subscribe to ardrone image_raw)
std_msgs::String msg;
public:
*** simplecanny()
: it_(nh_) ***
{
image_sub_ = it_.subscribe("/ardrone/image_raw", 1, &simplecanny::imageCb, this);
image_pub_= it_.advertise("/arcv/Image",1);
}
~simplecanny()
{
cv::destroyWindow(WINDOW);
}
...
在simplecanny() : it_(nh_)
构造函数中,我不熟悉该: it_(nh_)
部分。它有什么作用?这是运算符重载的情况吗?
提前致谢!