GEOS: Depth.h Source File

GEOS 3.3.8

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

Depth.h
1 /**********************************************************************
2 * $Id: Depth.h 2557 2009-06-08 09:30:55Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: geomgraph/Depth.java rev. 1.4 (JTS-1.10)
18 *
19 **********************************************************************/
20
21
22 #ifndef GEOS_GEOMGRAPH_DEPTH_H
23 #define GEOS_GEOMGRAPH_DEPTH_H
24
25 #include <geos/export.h>
26 #include <string>
27
28 #include <geos/inline.h>
29
30 // Forward declarations
31 namespace geos {
32 namespace geomgraph {
33 class Label;
34 }
35 }
36
37 namespace geos {
38 namespace geomgraph { // geos.geomgraph
39
40 class GEOS_DLL Depth {
41 public:
42 static int depthAtLocation(int location);
43 Depth();
44 virtual ~Depth(); // FIXME: shoudn't be virtual!
45 int getDepth(int geomIndex,int posIndex) const;
46 void setDepth(int geomIndex,int posIndex,int depthValue);
47 int getLocation(int geomIndex,int posIndex) const;
48 void add(int geomIndex,int posIndex,int location);
49 bool isNull() const;
50 bool isNull(int geomIndex) const;
51 bool isNull(int geomIndex, int posIndex) const;
52 int getDelta(int geomIndex) const;
53 void normalize();
54 void add(const Label& lbl);
55 std::string toString() const;
56 private:
57 enum {
58 NULL_VALUE=-1 //Replaces NULL
59 };
60 int depth[2][3];
61 };
62
63 } // namespace geos.geomgraph
64 } // namespace geos
65
66 //#ifdef GEOS_INLINE
67 //# include "geos/geomgraph/Depth.inl"
68 //#endif
69
70 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
71
72 /**********************************************************************
73 * $Log$
74 * Revision 1.2 2006/03/24 09:52:41 strk
75 * USE_INLINE => GEOS_INLINE
76 *
77 * Revision 1.1 2006/03/09 16:46:49 strk
78 * geos::geom namespace definition, first pass at headers split
79 *
80 **********************************************************************/
81