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
15extern "C" {
16#endif
17
18#ifndef NODELIST_H
19#define NODELIST_H
20
21#include <render.h>
22
23 typedef struct nodelistitem nodelistitem_t;
24
25 struct nodelistitem {
26 node_t *curr;
27 nodelistitem_t *next;
28 nodelistitem_t *prev;
29 };
30
31 typedef struct {
32 nodelistitem_t *first;
33 nodelistitem_t *last;
34 int sz;
35 } nodelist_t;
36
37 extern nodelist_t *mkNodelist(void);
38 extern void freeNodelist(nodelist_t *);
39 extern int sizeNodelist(nodelist_t * list);
40
41 extern void appendNodelist(nodelist_t *, nodelistitem_t *,
42 Agnode_t * n);
43/* extern void removeNodelist(nodelist_t* list, Agnode_t* n); */
44/* extern int node_exists(nodelist_t* list, Agnode_t* n); */
45/* extern int nodename_exists(nodelist_t* list, char* n); */
46 extern int node_position(nodelist_t * list, Agnode_t * n);
47
48 extern void realignNodelist(nodelist_t * list, nodelistitem_t * n);
49 extern void insertNodelist(nodelist_t *, Agnode_t *, Agnode_t *, int);
50
51 extern void reverseAppend(nodelist_t *, nodelist_t *);
52 extern nodelist_t *reverseNodelist(nodelist_t * list);
53 extern nodelist_t *cloneNodelist(nodelist_t * list);
54
55#ifdef DEBUG
56 extern void printNodelist(nodelist_t * list);
57#endif
58
59#endif
60
61#ifdef __cplusplus
62}
63#endif
64