Random Stuff from a software developer

This is a short guide to creating a notify call list which is useful for sending message across an entire program which can work dynamically. The clasic example of these is when a program is about to exit. This can give everything a chance to attach to events like this then handle the outcome.

For this particular example it uses a C++ template to create a class which will be able to Add / Remove or Call the list. Which will accept a basic type with a custom argument.

A short example of how to use the template above to pass two int's to a function. As you can see it is quite simple to use. You could of course pass other arguments types or make the functions very generic using something like Notify<int, void *> or pass an interface type class for handling the events.