Hi, 

On Saturday 20 May 2006 11:48, Werner Hoch wrote:
> There are two possible ways:
> a: put the hierarchy into a g_node structure and traverse it using
> the glib function:
> http://developer.gnome.org/doc/API/2.0/glib/glib-N-ary-Trees.html
> void        g_node_traverse                 (GNode *root,
>                                              GTraverseType order,
>                                              GTraverseFlags flags,
>                                              gint max_depth,
>                                              GNodeTraverseFunc func,
>                                              gpointer data);

advantage: if you have the tree and you have to traverse more than once 
for a problem, you can reuse the tree
disadvantage: you'll need an extra data structure for every stupid 
problem

> b: write a traversing function that is similar to g_node_traverse
>    this function could have additional options to set traversing oder
>    and level.

Implemented that.
Advantage: easy to pass options to it. The traversefunc interacts better 
with gEDA.
Disadvantage: for some problems you have to track the dependencies more 
than once.

e.g. autonumber_text has to create an index first and then attach the 
missing text elements to the symbols

[function declaration]

> I think the traverse function can only walk down and the hierarchy,
> (accessing multipage sisters and brothers; accessing child
> schematics)

We don't have a forrest, only a schematic tree.

[forrest problem]

the problem is gone ;-)

> Side notes:
> previous schematic and next schematic doesn't work
> jumping from multipage1_1.sch to multipage1_2.sch is not possible.

gone too. just some doc updates required.

Haven't coded very much. But the sketches for the changes are on paper 
now.

regards
Werner

Reply via email to