geos::planargraph::GraphComponent Class Reference

The base class for all graph component classes. More...

`#include <GraphComponent.h>`

Inheritance diagram for geos::planargraph::GraphComponent:

## Public Member Functions

virtual bool | isVisited () const
| Tests if a component has been visited during the course of a graph algorithm.
virtual void | setVisited (bool p_isVisited)
| Sets the visited flag for this component.
virtual bool | isMarked () const
| Tests if a component has been marked at some point during the processing involving this graph.
virtual void | setMarked (bool p_isMarked)
| Sets the marked flag for this component.

## Static Public Member Functions

template<typename T>
static void | setVisited (T start, T end, bool visited)
| Sets the Visited state for the elements of a container, from start to end iterator.
template<typename T>
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.
template<typename T>
static void | setMarked (T start, T end, bool marked)
| Sets the Marked state for the elements of a container, from start to end iterator.
template<typename T>
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.

## Protected Attributes

bool | isMarkedVar
| Variable holding ''marked'' status.
bool | isVisitedVar
| Variable holding ''visited'' status.

## Detailed Description

The base class for all graph component classes.

Maintains flags of use in generic graph algorithms. Provides two flags:

- marked - typically this is used to indicate a state that persists for the course of the graph's lifetime. For instance, it can be used to indicate that a component has been logically deleted from the graph.
- visited - this is used to indicate that a component has been processed or visited by an single graph algorithm. For instance, a breadth-first traversal of the graph might use this to indicate that a node has already been traversed. The visited flag may be set and cleared many times during the lifetime of a graph.

## Member Function Documentation

## isMarked()

virtual bool geos::planargraph::GraphComponent::isMarked | ( |  | ) | const

inline virtual

Tests if a component has been marked at some point during the processing involving this graph.

Returns
  `true` if the component has been marked

References isMarkedVar.

## isVisited()

virtual bool geos::planargraph::GraphComponent::isVisited | ( |  | ) | const

inline virtual

Tests if a component has been visited during the course of a graph algorithm.

Returns
  `true` if the component has been visited

References isVisitedVar.

## setMarked() [1/2]

virtual void geos::planargraph::GraphComponent::setMarked | ( | bool | p_isMarked | ) |

inline virtual

Sets the marked flag for this component.

Parameters

  p_isMarked | the desired value of the marked flag

References isMarkedVar.

## setMarked() [2/2]

template<typename T>

void geos::planargraph::GraphComponent::setMarked | ( | T | start,
|  | T | end,
|  | bool | marked )

inline static

Sets the Marked state for the elements of a container, from start to end iterator.

Parameters

  start | the start element
  end | one past the last element
  marked | the state to set the marked flag to

## setMarkedMap()

template<typename T>

void geos::planargraph::GraphComponent::setMarkedMap | ( | T | start,
|  | T | end,
|  | bool | marked )

inline static

Sets the Marked state for the values of each map container element, from start to end iterator.

Parameters

  start | the start element
  end | one past the last element
  marked | the state to set the visited flag to

## setVisited() [1/2]

virtual void geos::planargraph::GraphComponent::setVisited | ( | bool | p_isVisited | ) |

inline virtual

Sets the visited flag for this component.

Parameters

  p_isVisited | the desired value of the visited flag

References isVisitedVar.

## setVisited() [2/2]

template<typename T>

void geos::planargraph::GraphComponent::setVisited | ( | T | start,
|  | T | end,
|  | bool | visited )

inline static

Sets the Visited state for the elements of a container, from start to end iterator.

Parameters

  start | the start element
  end | one past the last element
  visited | the state to set the visited flag to

## setVisitedMap()

template<typename T>

void geos::planargraph::GraphComponent::setVisitedMap | ( | T | start,
|  | T | end,
|  | bool | visited )

inline static

Sets the Visited state for the values of each map container element, from start to end iterator.

Parameters

  start | the start element
  end | one past the last element
  visited | the state to set the visited flag to

The documentation for this class was generated from the following file:

- planargraph/GraphComponent.h