GEOS: Depth.h Source File

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

# Depth.h

    00001 /**********************************************************************
    00002  * $Id: Depth.h 1820 2006-09-06 16:54:23Z mloskot $
    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
    00018 #ifndef GEOS_GEOMGRAPH_DEPTH_H
    00019 #define GEOS_GEOMGRAPH_DEPTH_H
    00020
    00021 #include <string>
    00022
    00023 #include <geos/inline.h>
    00024
    00025 // Forward declarations
    00026 namespace geos {
    00027         namespace geomgraph {
    00028                 class Label;
    00029         }
    00030 }
    00031
    00032 namespace geos {
    00033 namespace geomgraph { // geos.geomgraph
    00034
    00035 class Depth {
    00036 public:
    00037         static int depthAtLocation(int location);
    00038         Depth();
    00039         virtual ~Depth(); // FIXME: shoudn't be virtual!
    00040         int getDepth(int geomIndex,int posIndex) const;
    00041         void setDepth(int geomIndex,int posIndex,int depthValue);
    00042         int getLocation(int geomIndex,int posIndex) const;
    00043         void add(int geomIndex,int posIndex,int location);
    00044         bool isNull() const;
    00045         bool isNull(int geomIndex) const;
    00046         bool isNull(int geomIndex, int posIndex) const;
    00047         int getDelta(int geomIndex) const;
    00048         void normalize();
    00049         void add(const Label& lbl);
    00050         std::string toString() const;
    00051 private:
    00052         enum {
    00053                 DEPTHNULL=-1 //Replaces NULL
    00054         };
    00055 //      static const int DEPTHNULL=-1; //Replaces NULL
    00056         int depth[2][3];
    00057 };
    00058
    00059 } // namespace geos.geomgraph
    00060 } // namespace geos
    00061
    00062 //#ifdef GEOS_INLINE
    00063 //# include "geos/geomgraph/Depth.inl"
    00064 //#endif
    00065
    00066 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
    00067
    00068 /**********************************************************************
    00069  * $Log$
    00070  * Revision 1.2  2006/03/24 09:52:41  strk
    00071  * USE_INLINE => GEOS_INLINE
    00072  *
    00073  * Revision 1.1  2006/03/09 16:46:49  strk
    00074  * geos::geom namespace definition, first pass at headers split
    00075  *
    00076  **********************************************************************/
    00077