[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: interesting links
On Thu, 2007-08-30 at 14:03 -0400, DJ Delorie wrote:
> C, not C++. Go read the pcb code; it has tables and switch statements
> all over the place that check the object type.
>
> If you're using vtables anyway, you might as well put a pointer to the
> vtable in the structure and skip all the "type" checking.
Yep - although my original reason for suggesting moving a function
pointer from the OBJECT struct was that it was a gschem pointer in a
libgeda structure. "type" belongs to libgeda, but the vfunc table with
front-end dependent drawing functions ought not.
Anyway - this is all very idealistic - I don't propose changing anything
right now, although I am looking into how libgeda / gschem could be
further separated into the model / view+controller pattern. In its
standard interpretation, this would entail allowing multiple views -
which means not putting view specific pointers / data in the model.
Peter C.
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user