Graphviz  2.41.20170921.2350
pointset.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 #ifndef _POINTSET_H
15 #define _POINTSET_H 1
16 
17 #include <cdt.h>
18 #include <geom.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24  typedef Dict_t PointSet;
25  typedef Dict_t PointMap;
26 #ifdef GVDLL
27 #define extern __declspec(dllexport)
28 #else
29 #define extern
30 #endif
31 
32 /*visual studio*/
33 #ifdef _WIN32
34 #ifndef GVC_EXPORTS
35 #undef extern
36 #define extern __declspec(dllimport)
37 #endif
38 #endif
39 /*end visual studio*/
40 
41  extern PointSet *newPS(void);
42  extern void freePS(PointSet *);
43  extern void insertPS(PointSet *, point);
44  extern void addPS(PointSet *, int, int);
45  extern int inPS(PointSet *, point);
46  extern int isInPS(PointSet *, int, int);
47  extern int sizeOf(PointSet *);
48  extern point *pointsOf(PointSet *);
49 
50  extern PointMap *newPM(void);
51  extern void clearPM(PointMap *);
52  extern void freePM(PointMap *);
53  extern int insertPM(PointMap *, int, int, int);
54  extern int updatePM(PointMap * pm, int x, int y, int v);
55 
56 #undef extern
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* _POINTSET_H */
void freePS(PointSet *ps)
Definition: pointset.c:68
void insertPS(PointSet *ps, point pt)
Definition: pointset.c:73
PointSet * newPS(void)
Definition: pointset.c:63
int insertPM(PointMap *pm, int x, int y, int v)
Definition: pointset.c:216
Dict_t PointSet
Definition: pointset.h:24
int updatePM(PointMap *pm, int x, int y, int v)
Definition: pointset.c:201
int sizeOf(PointSet *ps)
Definition: pointset.c:109
int isInPS(PointSet *ps, int x, int y)
Definition: pointset.c:101
point * pointsOf(PointSet *ps)
Definition: pointset.c:114
void clearPM(PointMap *ps)
Definition: pointset.c:182
void addPS(PointSet *ps, int x, int y)
Definition: pointset.c:82
Definition: geom.h:26
void freePM(PointMap *ps)
Definition: pointset.c:187
int inPS(PointSet *ps, point pt)
Definition: pointset.c:94
Definition: cdt.h:99
Dict_t PointMap
Definition: pointset.h:25
PointMap * newPM(void)
Definition: pointset.c:172