is there a better design for this interface?

Started by
11 comments, last by AlexKhomich 13 years, 10 months ago
virtual bool IsPaused() = 0;

Just as a sidenote, you should really make the method 'const':
virtual bool IsPaused() const = 0;
Advertisement
Ok. I am now using ref counting. I'm still interested if there is any better design for the ref counting class though. Possibly there isn't.
I like option with interface IPausable, its implementation in class Pausable for further reuse.

Also there are a bit of correction for your second variant of IPausable. Events OnPause/OnResume should be protected in other way you can't inherit that class.

This topic is closed to new replies.

Advertisement