• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

Depth.h

00001 /**********************************************************************
00002  * $Id: Depth.h 2557 2009-06-08 09:30:55Z strk $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************
00016  *
00017  * Last port: geomgraph/Depth.java rev. 1.4 (JTS-1.10)
00018  *
00019  **********************************************************************/
00020 
00021 
00022 #ifndef GEOS_GEOMGRAPH_DEPTH_H
00023 #define GEOS_GEOMGRAPH_DEPTH_H
00024 
00025 #include <geos/export.h>
00026 #include <string>
00027 
00028 #include <geos/inline.h>
00029 
00030 // Forward declarations
00031 namespace geos {
00032         namespace geomgraph {
00033                 class Label;
00034         }
00035 }
00036 
00037 namespace geos {
00038 namespace geomgraph { // geos.geomgraph
00039 
00040 class GEOS_DLL Depth {
00041 public:
00042         static int depthAtLocation(int location);
00043         Depth();
00044         virtual ~Depth(); // FIXME: shoudn't be virtual!
00045         int getDepth(int geomIndex,int posIndex) const;
00046         void setDepth(int geomIndex,int posIndex,int depthValue);
00047         int getLocation(int geomIndex,int posIndex) const;
00048         void add(int geomIndex,int posIndex,int location);
00049         bool isNull() const;
00050         bool isNull(int geomIndex) const;
00051         bool isNull(int geomIndex, int posIndex) const;
00052         int getDelta(int geomIndex) const;
00053         void normalize();
00054         void add(const Label& lbl);
00055         std::string toString() const;
00056 private:
00057         enum {
00058                 NULL_VALUE=-1 //Replaces NULL
00059         };
00060         int depth[2][3];
00061 };
00062 
00063 } // namespace geos.geomgraph
00064 } // namespace geos
00065 
00066 //#ifdef GEOS_INLINE
00067 //# include "geos/geomgraph/Depth.inl"
00068 //#endif
00069 
00070 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
00071 
00072 /**********************************************************************
00073  * $Log$
00074  * Revision 1.2  2006/03/24 09:52:41  strk
00075  * USE_INLINE => GEOS_INLINE
00076  *
00077  * Revision 1.1  2006/03/09 16:46:49  strk
00078  * geos::geom namespace definition, first pass at headers split
00079  *
00080  **********************************************************************/
00081 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1