Commit 880659f1 authored by Paweł Wegner's avatar Paweł Wegner

IRequest: introduced callback factory method.

parent 4833cecc
......@@ -230,6 +230,12 @@ class GenericCallback {
void operator()(Arguments... d) const { functor_->done(d...); }
template <class Callback, class... CallbackArguments>
static typename IGenericCallback<Arguments...>::Pointer make(
CallbackArguments&&... args) {
return std::make_shared<Callback>(std::forward<CallbackArguments>(args)...);
}
private:
class Functor : public IGenericCallback<Arguments...> {
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment