21 #ifndef GEOS_PLANARGRAPH_GRAPHCOMPONENT_H
22 #define GEOS_PLANARGRAPH_GRAPHCOMPONENT_H
24 #include <geos/export.h>
27 namespace planargraph {
73 virtual bool isVisited()
const {
return isVisitedVar; }
79 virtual void setVisited(
bool isVisited) { isVisitedVar=isVisited; }
91 for(T i=start; i!=end; ++i) {
92 (*i)->setVisited(visited);
104 template <
typename T>
106 for(T i=start; i!=end; ++i) {
107 i->second->setVisited(visited);
119 template <
typename T>
121 for(T i=start; i!=end; ++i) {
122 (*i)->setMarked(marked);
135 template <
typename T>
137 for(T i=start; i!=end; ++i) {
138 i->second->setMarked(marked);
147 virtual bool isMarked()
const {
return isMarkedVar; }
153 virtual void setMarked(
bool isMarked) { isMarkedVar=isMarked; }
163 #endif // GEOS_PLANARGRAPH_GRAPHCOMPONENT_H
virtual bool isVisited() const
Tests if a component has been visited during the course of a graph algorithm.
Definition: planargraph/GraphComponent.h:73
bool isMarkedVar
Variable holding ''marked'' status.
Definition: planargraph/GraphComponent.h:52
static void setVisitedMap(T start, T end, bool visited)
Sets the Visited state for the values of each map container element, from start to end iterator...
Definition: planargraph/GraphComponent.h:105
virtual bool isMarked() const
Tests if a component has been marked at some point during the processing involving this graph...
Definition: planargraph/GraphComponent.h:147
virtual void setVisited(bool isVisited)
Sets the visited flag for this component.
Definition: planargraph/GraphComponent.h:79
virtual void setMarked(bool isMarked)
Sets the marked flag for this component.
Definition: planargraph/GraphComponent.h:153
static void setMarked(T start, T end, bool marked)
Sets the Marked state for the elements of a container, from start to end iterator.
Definition: planargraph/GraphComponent.h:120
static void setVisited(T start, T end, bool visited)
Sets the Visited state for the elements of a container, from start to end iterator.
Definition: planargraph/GraphComponent.h:90
static void setMarkedMap(T start, T end, bool marked)
Sets the Marked state for the values of each map container element, from start to end iterator...
Definition: planargraph/GraphComponent.h:136
The base class for all graph component classes.
Definition: planargraph/GraphComponent.h:47
bool isVisitedVar
Variable holding ''visited'' status.
Definition: planargraph/GraphComponent.h:55