GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2005-2006 Refractions Research Inc. 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 ********************************************************************** 00015 * 00016 * Last port: geomgraph/Depth.java rev. 1.4 (JTS-1.10) 00017 * 00018 **********************************************************************/ 00019 00020 00021 #ifndef GEOS_GEOMGRAPH_DEPTH_H 00022 #define GEOS_GEOMGRAPH_DEPTH_H 00023 00024 #include <geos/export.h> 00025 #include <string> 00026 00027 #include <geos/inline.h> 00028 00029 // Forward declarations 00030 namespace geos { 00031 namespace geomgraph { 00032 class Label; 00033 } 00034 } 00035 00036 namespace geos { 00037 namespace geomgraph { // geos.geomgraph 00038 00039 class GEOS_DLL Depth { 00040 public: 00041 static int depthAtLocation(int location); 00042 Depth(); 00043 virtual ~Depth(); // FIXME: shoudn't be virtual! 00044 int getDepth(int geomIndex,int posIndex) const; 00045 void setDepth(int geomIndex,int posIndex,int depthValue); 00046 int getLocation(int geomIndex,int posIndex) const; 00047 void add(int geomIndex,int posIndex,int location); 00048 bool isNull() const; 00049 bool isNull(int geomIndex) const; 00050 bool isNull(int geomIndex, int posIndex) const; 00051 int getDelta(int geomIndex) const; 00052 void normalize(); 00053 void add(const Label& lbl); 00054 std::string toString() const; 00055 private: 00056 enum { 00057 NULL_VALUE=-1 //Replaces NULL 00058 }; 00059 int depth[2][3]; 00060 }; 00061 00062 } // namespace geos.geomgraph 00063 } // namespace geos 00064 00065 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H