Sorry if this has been discussed before (I'm almost certain it has), but
I didn't know what to google for.
My problem is, I have a class, a gtkmm widget, and I want it to serve as
a base class now, but I'm not sure if I'm taking the proper steps in
order to not break the whole class.
Are there any guidelines what I have to watch out for?
One question would e.g. be:
Some (or many) members which have been private so far, probably need to
be protected now. One problem is that I can't really tell in advance
which of those member should stay private and which ones should become
protected, because that mostly depends on what people intend to do with
their class when deriving from my widget.
But I suppose it's a bad idea to take this as an argument for making ALL
private members protected now?
Another question:
Is it sufficient to make the members in question protected, or should
they stay private and protected accessor methods introduced?
--
Matthias Kaeppler
I didn't know what to google for.
My problem is, I have a class, a gtkmm widget, and I want it to serve as
a base class now, but I'm not sure if I'm taking the proper steps in
order to not break the whole class.
Are there any guidelines what I have to watch out for?
One question would e.g. be:
Some (or many) members which have been private so far, probably need to
be protected now. One problem is that I can't really tell in advance
which of those member should stay private and which ones should become
protected, because that mostly depends on what people intend to do with
their class when deriving from my widget.
But I suppose it's a bad idea to take this as an argument for making ALL
private members protected now?
Another question:
Is it sufficient to make the members in question protected, or should
they stay private and protected accessor methods introduced?
--
Matthias Kaeppler
Comment