|
-
September 5th, 2011, 01:45 PM
#6
Re: Update all instances of a class with a single funtion?
 Originally Posted by Eri523
I think I'd probably make the vector of timer pointers a static member of the timer class itself, most likely a private one. The "update all timers" function would then be a (public) static member of that class as well. And timer objects would register themselves in their constructor. That way the whole thing would be pretty self-contained...
in effect, that's a singleton then ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|