Category : registration

I found this code for event handler with registration style in c++. Can anyone explain me, what the below code does? #include <algorithm> #include <functional> #include <list> class Button { public: typedef void (*OnPress)(Button *, void *closure); private: typedef std::pair<OnPress, void*> PressCallBack; std::list<PressCallBack> onPress; struct Notify: public std::binary_function<PressCallBack, Button*, void> { void operator()( PressCallBack& c, ..

Read more