| 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 */ |
| 62 | |