Re: [gtkmm] Slots from non-Gtk subclasses.



Am 2003.02.24 22:12 schrieb(en) Carl Nygard:
On Mon, 2003-02-24 at 05:43, Martin Schulze wrote:

[...]

> By the way: According to my rusty c++ knowledge you should only
> use virtual base classes if you really need them for efficiency reasons.

Umm, I think you need virtual base class anytime you derive from two
classes that use the same base class.  The classic "diamond" inheritance
tree shows what happens.

Right, but that was not the original question. If your program doesn't need
multiple inheritance with the specific inheritance tree below then it doesn't
need virtual base classes either. It's all c++: if you know what you are
doing you can avoid a lot of inefficient stuff :-)

            A       A(1)    A(2)
           / \       \       /
          B   C       B     C
           \ /         \   /
            D            D


Regards,

  Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]