Boost signals
Much more like event handler in C# and still working on its difference with delegate, which is combinable.
#include <boost/signal.hpp>
#include <iostream>
void func()
{
std::cout << "Hello, world!" << std::endl;
}
void func2(){
std::cout<<"Me too!"<<std::endl;
}
int main()
{
boost::signal<void ()> s;
s.connect(func);
s.connect(func2);
s.connect(func);
s.disconnect(func);
s();
}
No comments yet.
Leave a Reply
-
Recent
-
Links
-
Archives
- April 2011 (3)
- March 2011 (21)
- May 2010 (1)
- January 2010 (2)
- December 2009 (2)
- August 2009 (1)
- July 2009 (2)
- April 2009 (4)
- March 2009 (6)
- February 2009 (5)
- January 2009 (4)
- December 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS