00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
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 {
00040
00041
00042 class GEOS_DLL GraphComponent {
00043 public:
00044 GraphComponent();
00045
00046
00047
00048
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 }
00074 }
00075
00076
00077
00078
00079
00080 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091