What is the signature on InstallDataFn
? I'm not sure if this would technically be correct unless that function is doing something else? (And I can't find any API docs that match this with a cursory search n_n')
If you want something more reusable, then yeah you may wish to use std::bind
or a lambda- cache it off in your MyApp
class as a std::function<void, DaqDataHeader, data>
and pass a pointer to that for your argument. Then check, cast, dereference, and call the underlying std::function
in handleData
. That way you can make it anything that matches that function signature in the future.