This file is indexed.

/usr/include/geos/planargraph/GraphComponent.h is in libgeos-dev 3.2.2-3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/**********************************************************************
 * $Id: GraphComponent.h 2563 2009-06-08 15:43:40Z strk $
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.refractions.net
 *
 * Copyright (C) 2001-2002 Vivid Solutions Inc.
 * Copyright (C) 2005-2006 Refractions Research Inc.
 *
 * This is free software; you can redistribute and/or modify it under
 * the terms of the GNU Lesser General Public Licence as published
 * by the Free Software Foundation. 
 * See the COPYING file for more information.
 *
 **********************************************************************
 *
 * Last port: planargraph/GraphComponent.java rev. 1.7 (JTS-1.7)
 *
 **********************************************************************/

#ifndef GEOS_PLANARGRAPH_GRAPHCOMPONENT_H
#define GEOS_PLANARGRAPH_GRAPHCOMPONENT_H

#include <geos/export.h>

namespace geos {
namespace planargraph { // geos.planargraph

/**
 * \brief The base class for all graph component classes.
 *
 * Maintains flags of use in generic graph algorithms.
 * Provides two flags:
 * 
 *  - <b>marked</b> - 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.
 *  - <b>visited</b> - 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.
 *
 */
class GEOS_DLL GraphComponent {

protected:

	/// Variable holding ''marked'' status
	bool isMarkedVar;

	/// Variable holding ''visited'' status
	bool isVisitedVar;

public:

	GraphComponent()
		:
		isMarkedVar(false),
		isVisitedVar(false)
		{}

	virtual ~GraphComponent() {};

	/** \brief
	 * Tests if a component has been visited during the course
	 * of a graph algorithm.
	 *
	 * @return <code>true</code> if the component has been visited
	 */
	virtual bool isVisited() const { return isVisitedVar; }

	/** \brief
	 * Sets the visited flag for this component.
	 * @param isVisited the desired value of the visited flag
	 */
	virtual void setVisited(bool isVisited) { isVisitedVar=isVisited; }

	/** \brief
	 * Sets the Visited state for the elements of a container,
	 * from start to end iterator.
	 *
	 * @param start the start element
	 * @param end one past the last element
	 * @param visited the state to set the visited flag to
	 */
	template <typename T>
	static void setVisited(T start, T end, bool visited) {
		for(T i=start; i!=end; ++i) {
			(*i)->setVisited(visited);
		}
	}

	/** \brief
	 * Sets the Visited state for the values of each map
	 * container element, from start to end iterator.
	 *
	 * @param start the start element
	 * @param end one past the last element
	 * @param visited the state to set the visited flag to
	 */
	template <typename T>
	static void setVisitedMap(T start, T end, bool visited) {
		for(T i=start; i!=end; ++i) {
			i->second->setVisited(visited);
		}
	}

	/** \brief
	 * Sets the Marked state for the elements of a container,
	 * from start to end iterator.
	 *
	 * @param start the start element
	 * @param end one past the last element
	 * @param marked the state to set the marked flag to
	 */
	template <typename T>
	static void setMarked(T start, T end, bool marked) {
		for(T i=start; i!=end; ++i) {
			(*i)->setMarked(marked);
		}
	}


	/** \brief
	 * Sets the Marked state for the values of each map
	 * container element, from start to end iterator.
	 *
	 * @param start the start element
	 * @param end one past the last element
	 * @param marked the state to set the visited flag to
	 */
	template <typename T>
	static void setMarkedMap(T start, T end, bool marked) {
		for(T i=start; i!=end; ++i) {
			i->second->setMarked(marked);
		}
	}

	/** \brief
	 * Tests if a component has been marked at some point
	 * during the processing involving this graph.
	 * @return <code>true</code> if the component has been marked
	 */
	virtual bool isMarked() const { return isMarkedVar; }

	/** \brief
	 * Sets the marked flag for this component.
	 * @param isMarked the desired value of the marked flag
	 */
	virtual void setMarked(bool isMarked) { isMarkedVar=isMarked; }

};

// For backward compatibility
//typedef GraphComponent planarGraphComponent;

} // namespace geos::planargraph
} // namespace geos

#endif // GEOS_PLANARGRAPH_GRAPHCOMPONENT_H

/**********************************************************************
 * $Log$
 * Revision 1.1  2006/03/21 21:42:54  strk
 * planargraph.h header split, planargraph:: classes renamed to match JTS symbols
 *
 **********************************************************************/