Graphviz 2.29.20120208.0545
lib/circogen/nodelist.h
Go to the documentation of this file.
00001 /* $Id$ $Revision$ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /*************************************************************************
00005  * Copyright (c) 2011 AT&T Intellectual Property 
00006  * All rights reserved. This program and the accompanying materials
00007  * are made available under the terms of the Eclipse Public License v1.0
00008  * which accompanies this distribution, and is available at
00009  * http://www.eclipse.org/legal/epl-v10.html
00010  *
00011  * Contributors: See CVS logs. Details at http://www.graphviz.org/
00012  *************************************************************************/
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00018 #ifndef NODELIST_H
00019 #define NODELIST_H
00020 
00021 #include  <render.h>
00022 
00023     typedef struct nodelistitem nodelistitem_t;
00024 
00025     struct nodelistitem {
00026         node_t *curr;
00027         nodelistitem_t *next;
00028         nodelistitem_t *prev;
00029     };
00030 
00031     typedef struct {
00032         nodelistitem_t *first;
00033         nodelistitem_t *last;
00034         int sz;
00035     } nodelist_t;
00036 
00037     extern nodelist_t *mkNodelist(void);
00038     extern void freeNodelist(nodelist_t *);
00039     extern int sizeNodelist(nodelist_t * list);
00040 
00041     extern void appendNodelist(nodelist_t *, nodelistitem_t *,
00042                                Agnode_t * n);
00043 /* extern void removeNodelist(nodelist_t* list, Agnode_t* n); */
00044 /* extern int node_exists(nodelist_t* list, Agnode_t* n); */
00045 /* extern int nodename_exists(nodelist_t* list, char* n); */
00046     extern int node_position(nodelist_t * list, Agnode_t * n);
00047 
00048     extern void realignNodelist(nodelist_t * list, nodelistitem_t * n);
00049     extern void insertNodelist(nodelist_t *, Agnode_t *, Agnode_t *, int);
00050 
00051     extern void reverseAppend(nodelist_t *, nodelist_t *);
00052     extern nodelist_t *reverseNodelist(nodelist_t * list);
00053     extern nodelist_t *cloneNodelist(nodelist_t * list);
00054 
00055 #ifdef DEBUG
00056     extern void printNodelist(nodelist_t * list);
00057 #endif
00058 
00059 #endif
00060 
00061 #ifdef __cplusplus
00062 }
00063 #endif