Graphviz  2.41.20170921.2350
grid.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #ifndef GRID_H
19 #define GRID_H
20 
21 #include "config.h"
22 
23 #include <render.h>
24 #include <cdt.h>
25 
26  typedef struct _grid Grid;
27 
28  typedef struct _node_list {
30  struct _node_list *next;
31  } node_list;
32 
33  typedef struct {
34  int i, j;
35  } gridpt;
36 
37  typedef struct {
38  gridpt p; /* index of cell */
39  node_list *nodes; /* nodes in cell */
40  Dtlink_t link; /* cdt data */
41  } cell;
42 
43  extern Grid *mkGrid(int);
44  extern void adjustGrid(Grid * g, int nnodes);
45  extern void clearGrid(Grid *);
46  extern void addGrid(Grid *, int, int, Agnode_t *);
47  extern void walkGrid(Grid *, int (*)(Dt_t *, cell *, Grid *));
48  extern cell *findGrid(Grid *, int, int);
49  extern void delGrid(Grid *);
50  extern int gLength(cell * p);
51 
52 #endif
53 
54 #ifdef __cplusplus
55 }
56 #endif
Agnode_t * node
Definition: grid.h:29
struct _node_list node_list
gridpt p
Definition: grid.h:38
int j
Definition: grid.h:34
Dtlink_t link
Definition: grid.h:40
node_list * nodes
Definition: grid.h:39
struct _node_list * next
Definition: grid.h:30
Definition: grid.c:69
void addGrid(Grid *g, int i, int j, Agnode_t *n)
Definition: grid.c:221
Definition: grid.h:37
Grid * mkGrid(int cellHint)
Definition: grid.c:163
void walkGrid(Grid *g, int(*walkf)(Dt_t *, cell *, Grid *))
Definition: grid.c:243
void adjustGrid(Grid *g, int nnodes)
Definition: grid.c:182
void delGrid(Grid *g)
Definition: grid.c:210
cell * findGrid(Grid *g, int i, int j)
Definition: grid.c:252
void clearGrid(Grid *g)
Definition: grid.c:199
Definition: cdt.h:99
Definition: grid.h:33
int gLength(cell *p)
Definition: grid.c:264