Skip to content

Instantly share code, notes, and snippets.

@r2p2
Created July 20, 2011 19:07
Show Gist options
  • Save r2p2/1095666 to your computer and use it in GitHub Desktop.
Save r2p2/1095666 to your computer and use it in GitHub Desktop.
hm
#include <utils/event/signal.h>
#include <iostream>
class MySlot
{
public:
void slot()
{
std::cout << "foo" << std::endl;
}
};
int main()
{
utils::event::Signal<> s;
{
MySlot slot;
s.register_callback(slot, &MySlot::slot);
}
s.emit_signal();
return 0;
}
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment