Mail Archives: geda-user/2016/01/02/13:42:06
On Sat, 2 Jan 2016, Peter Clifton (petercjclifton AT googlemail DOT com) [via geda-user AT delorie DOT com] wrote:
> On 2 Jan 2016 09:18, <karl AT aspodata DOT se> wrote:
> > Wouldn't it make sense to move things (that isn't related to a gui)
> > from gschem to libgeda ?
It's more the other way round--libgeda contains many things which are
related to the GUI and should be moved to gschem. IMHO, it would make
most sense to pull the general-purpose and gnetlist-related functionality
out of libgeda and merge the remaining code back to gschem.
> whilst I'd concede there might be cases for moving certain code one way
> or the other, I think a more formalised separation of libraries and ui
> programs is good. It just depends on logical separation, and potential
> reuse cases.
This is what I intend with Xorn (see my post "What Xorn does, and why it
does it like that"). The idea is to move the relevant functionality of
gEDA into a set of libraries and have the GUI programs basically be
frontends to these.
> It could start to allow a framework where we use plugins that apply some
> of the semantic attribute meanings at a point shared between the tools.
> (Meaning you can have smarter behaviours in gschem whilst those workflow
> specific plugins are loaded). I would love to see things like slotting
> move to being a plugin, for example.
You might want to have a look at the pp_*.py files in
xorn/src/python/geda/netlist. When refactoring the netlister, I moved all
code related to an optional feature (slotting, hierarchy, the graphical=
and net= attributes) to a single file which is called from the main
netlisting function to post-process the netlist. When using a custom
netlisting pipeline, you could just skip these function calls or replace
them with something else.
> gnetlist should continue to function and look the same to the outside
> world, but code wise - may end up much simpler, probably just providing
> a invocation wrapper around the backend scheme code.
This is how "xorn netlist" works. :-)
- Raw text -