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 #include <geos/geomgraph/Label.h>
00029
00030
00031 namespace geos {
00032 namespace geom {
00033 class IntersectionMatrix;
00034 }
00035 }
00036
00037 namespace geos {
00038 namespace geomgraph {
00039
00040
00047 class GEOS_DLL GraphComponent {
00048 public:
00049 GraphComponent();
00050
00051
00052
00053
00054 GraphComponent(const Label& newLabel);
00055 virtual ~GraphComponent();
00056
00057 Label& getLabel() { return label; }
00058 const Label& getLabel() const { return label; }
00059 void setLabel(const Label& newLabel) { label = newLabel; }
00060
00061 virtual void setInResult(bool isInResult) { isInResultVar=isInResult; }
00062 virtual bool isInResult() const { return isInResultVar; }
00063 virtual void setCovered(bool isCovered);
00064 virtual bool isCovered() const { return isCoveredVar; }
00065 virtual bool isCoveredSet() const { return isCoveredSetVar; }
00066 virtual bool isVisited() const { return isVisitedVar; }
00067 virtual void setVisited(bool isVisited) { isVisitedVar = isVisited; }
00068 virtual bool isIsolated() const=0;
00069 virtual void updateIM(geom::IntersectionMatrix& im);
00070 protected:
00071 Label label;
00072 virtual void computeIM(geom::IntersectionMatrix& im)=0;
00073 private:
00074 bool isInResultVar;
00075 bool isCoveredVar;
00076 bool isCoveredSetVar;
00077 bool isVisitedVar;
00078 };
00079
00080 }
00081 }
00082
00083 #endif // ifndef GEOS_GEOMGRAPH_GRAPHCOMPONENT_H