GEOS: GraphComponent.h Source File

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

- File List

# GraphComponent.h

    00001 /**********************************************************************
    00002  * $Id: GraphComponent.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/GraphComponent.java rev. 1.3 (JTS-1.10)
    00018  *
    00019  **********************************************************************/
    00020
    00021
    00022 #ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
    00023 #define GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
    00024
    00025 #include <geos/export.h>
    00026 #include <geos/inline.h>
    00027
    00028 // Forward declarations
    00029 namespace geos {
    00030         namespace geom {
    00031                 class IntersectionMatrix;
    00032         }
    00033         namespace geomgraph {
    00034                 class Label;
    00035         }
    00036 }
    00037
    00038 namespace geos {
    00039 namespace geomgraph { // geos.geomgraph
    00040
    00041
    00042 class GEOS_DLL GraphComponent {
    00043 public:
    00044         GraphComponent();
    00045
    00046         /*
    00047          * GraphComponent takes ownership of the given Label.
    00048          * newLabel is deleted by destructor.
    00049          */
    00050         GraphComponent(Label* newLabel);
    00051         virtual ~GraphComponent();
    00052         Label* getLabel();
    00053         virtual void setLabel(Label* newLabel);
    00054         virtual void setInResult(bool isInResult) { isInResultVar=isInResult; }
    00055         virtual bool isInResult() const { return isInResultVar; }
    00056         virtual void setCovered(bool isCovered);
    00057         virtual bool isCovered() const { return isCoveredVar; }
    00058         virtual bool isCoveredSet() const { return isCoveredSetVar; }
    00059         virtual bool isVisited() const { return isVisitedVar; }
    00060         virtual void setVisited(bool isVisited) { isVisitedVar = isVisited; }
    00061         virtual bool isIsolated() const=0;
    00062         virtual void updateIM(geom::IntersectionMatrix *im);
    00063 protected:
    00064         Label* label;
    00065         virtual void computeIM(geom::IntersectionMatrix *im)=0;
    00066 private:
    00067         bool isInResultVar;
    00068         bool isCoveredVar;
    00069         bool isCoveredSetVar;
    00070         bool isVisitedVar;
    00071 };
    00072
    00073 } // namespace geos.geomgraph
    00074 } // namespace geos
    00075
    00076 //#ifdef GEOS_INLINE
    00077 //# include "geos/geomgraph/GraphComponent.inl"
    00078 //#endif
    00079
    00080 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
    00081
    00082 /**********************************************************************
    00083  * $Log$
    00084  * Revision 1.2  2006/03/24 09:52:41  strk
    00085  * USE_INLINE => GEOS_INLINE
    00086  *
    00087  * Revision 1.1  2006/03/09 16:46:49  strk
    00088  * geos::geom namespace definition, first pass at headers split
    00089  *
    00090  **********************************************************************/
    00091