A generic C++ eventsystem library relying on templates