Sign in to follow this  
jwezorek

C++ signals and slots libraries for games

Recommended Posts

Which is best?

I read in this old post and elsewhere that boost::signals is shockingly slow so that seems out.

Does anyone know if Sneftel's code from the above link has been updated anywhere? (the link is 10 years old).

Stackoverflow also mentions  libsigc++, but again that post is kind of old.

Thoughts? Are there other ones to consider?

Edited by jwezorek

Share this post


Link to post
Share on other sites

There's "A lightweight signals and slots implementation.":

https://github.com/pbhogan/Signals

I'm using it myself, never measured performance though - its fast enough for my UI system. Shameless plug: I actually wrote an updated version with less code, that is simpler to use (SignalX merged into one class with var-templates, helper functions like connectSignals), which you can find here, if you can use C++11:

https://www.gamedev.net/index.php?app=core&module=attach&section=attach&attach_id=24237

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this