00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
00019 #define GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
00020
00021 #include <geos/inline.h>
00022
00023
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 {
00035
00036
00037 class GraphComponent {
00038 public:
00039 GraphComponent();
00040
00041
00042
00043
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 }
00069 }
00070
00071
00072
00073
00074
00075 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086