Function Pointers

I need to convert a C program that made extensive use of function pointers for despatching tasks into a C++ program. I have looked at a variety of functor implementations and the possibility of delegates, but was wondering if anyone has a particular simple implementation. The functions to despatch would be public class members with a common prototype and the despatcher would need to be able to despatch such tasks from various classes. I am using gcc in an embedded Arm environment.
Cheers, Ron
C++11 has a std:function:

http://www.cplusplus.com/reference/functional/function/?kw=function

With std::bind() member function can be passed;

http://www.cplusplus.com/reference/functional/bind/?kw=bind

There also lambda functions:

http://en.cppreference.com/w/cpp/language/lambda

Further more boost signal/slot:

http://www.boost.org/doc/libs/1_61_0/doc/html/signals2.html

So there are several option to choose from.
Topic archived. No new replies allowed.