Re: [gtk-list] Glade/Gtk-- design proposals (longish)



Christof Petig <christof.petig@wtal.de> writes:

> glade2cxx might be or not be a seperate program: (+ pro / - con)
> + a decent C++ class hirarchy (with STL) can be used to parse the glade
> file and produce output.
> + Flexible, up to date (STL), easy to extend,

Don't count on the STL too much. At this time gtk-- is still supposed
to be compilable with gcc 2.7.2.

> - code duplication (the methods to read XML and write C code are also in
> gbfoo.c). They need adaption, though they should not share too much
> (classes are a different concept).

Is the parsing code actually written, or is it lex/yacc generated ?
pccts would be a good choice I think. Its C++ support is much better
than lex/yacc's.

> + small, pure C++ design

When writing gtk-- bindings, one of the hardest things is to determine
what should be rewriten in C++ (usually very little, but the
temptation is usually great) and what should be left as calls to C
functions... The overall idea is to write as little code as possible.

> I tend to make it a seperate beast.

I sympathize with your feelings toward C++ (myself preferring C++ over
C any day), and I've never seen glade's code (so I probably should
shut up :-), but I'd still advise you to think carefully about what
you can reuse.

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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