1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 2015-2020 gEDA Contributors (see ChangeLog for details)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 /*! \file gschem_patch.h
21 * \brief Back-annotation from pcb-rnd.
24 /* this type of object should be only on a search list */
28 GSCHEM_PATCH_DEL_CONN
,
29 GSCHEM_PATCH_ADD_CONN
,
30 GSCHEM_PATCH_CHANGE_ATTRIB
,
31 GSCHEM_PATCH_NET_INFO
,
34 typedef struct gschem_patch_line_s gschem_patch_line_t
;
35 struct gschem_patch_line_s
{
41 GList
*ids
; /* for net_info */
47 gschem_patch_line_t
*next
;
51 GList
*lines
; /* an ordered list of patch lines
52 (of gschem_patch_line_t *) */
53 GHashTable
*pins
; /* refdes-pinnumber -> gschem_patch_pin_t* */
54 GHashTable
*comps
; /* refdes -> complex object */
55 GHashTable
*nets
; /* net_name -> GList* of pins as seen by the sender */
56 } gschem_patch_state_t
;
65 OBJECT
*obj
; /* object that creates the pin;
66 for net attributes it is the complex object */
67 gchar
*net
; /* non-NULL when the pin is auto-connected to a net */
71 int gschem_patch_state_init (gschem_patch_state_t
*st
, const char *fn
);
72 int gschem_patch_state_build (gschem_patch_state_t
*st
, OBJECT
*o
);
73 GSList
*gschem_patch_state_execute (gschem_patch_state_t
*st
);
74 void gschem_patch_state_destroy (gschem_patch_state_t
*st
);
75 void gschem_patch_free_hit_list (GSList
*hits
);