Subj : Re: Can you mimic atexit() for class functions? To : borland.public.cpp.borlandcpp From : Mike Goodey Date : Tue Oct 14 2003 10:13 am In article <3F837C67.3040604@cordelli.net>, Gary wrote: > just wondering if it is possible to have a member function in various > (different) classes, but provide a single additional class that defines > some kind of "AddCallback()" function that each object of the various > other classes can call in order to add their own member function to a > callback list so that the single additional class can invoke the list of > added callbacks each in turn ? > I would have thought one of the C++ gurus would have said this before, but here goes - this looks like the "Visitor" design pattern. If you have never looked at patterns before, now is the time to start! Mike .