GEOS: GraphComponent.h Source File

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

# GraphComponent.h

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