Debtags Library

Erich Schubert erich@debian.org
Sun, 11 Jul 2004 16:50:06 +0200


> much overhead. I don't know about the performance of such an solution a=
s
> it would involve virtual function calls, but it might be a good generic
> solution. I've attached a screenshot to clarify what I mean.

Since you can do that easily without virtual (and probably you
won't need any additional memory) i think not using virtual functions
is better here (and expected to be faster, too)

just use a pointer to the children list. If the pointer is NULL,
then there are no children, thus the size is 0. Otherwise, return the
size value of the children list (which probably already has a length
counter, no need to make a duplicate for that).

Greetings,
Erich Schubert
--=20
    erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C     (o_
    There was never a good war or a bad peace. - Benjamin Franklin    //\
 Jemanden zu lieben hei=DFt gl=FCcklich zu sein, ihn gl=FCcklich zu sehen=
.  V_/_