4 May
2009
4 May
'09
1:08 p.m.
void setCompleteFunction(boost::function< void (int errorCode, const string &data, HeaderMapPtr headers) > f);
I try to bind to it: -
wc->setCompleteFunction(boost::bind(&NetworkEventHandler::receiveSkinDownloadResult, this, _1, _2, _3, wc,myFile, filename.str(), carId, crc, networkPlayerId));
The boost::function you have to pass as a parameter gets 3 parameters. If you want to "delay" passing all the 3 params, you create the following binder: bind(&NetworkEventHandler::receiveSkinDownloadResult, this, _1, _2, _3); If you want to bind some of params, you can do it like this: bind(&NetworkEventHandler::receiveSkinDownloadResult, this, knownErrorCore, _1, _2);