GEOS  3.8.0dev
Depth.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: geomgraph/Depth.java rev. 1.4 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 
21 #ifndef GEOS_GEOMGRAPH_DEPTH_H
22 #define GEOS_GEOMGRAPH_DEPTH_H
23 
24 #include <geos/export.h>
25 #include <string>
26 
27 #include <geos/inline.h>
28 
29 // Forward declarations
30 namespace geos {
31 namespace geomgraph {
32 class Label;
33 }
34 }
35 
36 namespace geos {
37 namespace geomgraph { // geos.geomgraph
38 
39 class GEOS_DLL Depth {
40 public:
41  static int depthAtLocation(int location);
42  Depth();
43  virtual ~Depth(); // FIXME: shoudn't be virtual!
44  int getDepth(int geomIndex, int posIndex) const;
45  void setDepth(int geomIndex, int posIndex, int depthValue);
46  int getLocation(int geomIndex, int posIndex) const;
47  void add(int geomIndex, int posIndex, int location);
48  bool isNull() const;
49  bool isNull(int geomIndex) const;
50  bool isNull(int geomIndex, int posIndex) const;
51  int getDelta(int geomIndex) const;
52  void normalize();
53  void add(const Label& lbl);
54  std::string toString() const;
55 private:
56  enum {
57  NULL_VALUE = -1 //Replaces NULL
58  };
59  int depth[2][3];
60 };
61 
62 } // namespace geos.geomgraph
63 } // namespace geos
64 
65 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25