One thing to note about the EventClientList.h example
is the "purify()" function (if anyone wants to take a shot
at fixing the C++ code). The reason for purify() is to
avoid problems when an EventClient is removed while
the list iterator pointing to it is active (being used to run
code).
One trick to solving this problem is shown in the following
header file (look for the CallbackList<F>::doIterate() method):
http://bzflag.svn.sourceforge.net/viewv ... iew=markup
That's seemed clunky to me, so instead I setup a dummy
EventClient instance, and replaced the EventClient pointer
in the list with the dummy instance (which has member
functions that don't do anything). A 'purify' flag is set on any
EventClientList with a removal, and you just have to clean
out the dummy instance pointers every once in a while.