This file is indexed.

/usr/include/geos/geomgraph/DirectedEdge.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/**********************************************************************
 * $Id: DirectedEdge.h 2557 2009-06-08 09:30:55Z strk $
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.refractions.net
 *
 * Copyright (C) 2005-2006 Refractions Research Inc.
 * Copyright (C) 2001-2002 Vivid Solutions 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: geomgraph/DirectedEdge.java rev. 1.5 (JTS-1.10)
 *
 **********************************************************************/


#ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
#define GEOS_GEOMGRAPH_DIRECTEDEDGE_H

#include <geos/export.h>
#include <string>

#include <geos/geomgraph/EdgeEnd.h> // for inheritance

#include <geos/inline.h>

// Forward declarations
namespace geos {
	namespace geomgraph {
		class Edge;
		class EdgeRing;
	}
}

namespace geos {
namespace geomgraph { // geos.geomgraph

/// A directed EdgeEnd
class GEOS_DLL DirectedEdge: public EdgeEnd {

public:

	/** \brief
	 * Computes the factor for the change in depth when moving from
	 * one location to another.
	 * E.g. if crossing from the INTERIOR to the EXTERIOR the depth
	 * decreases, so the factor is -1
	 */
	static int depthFactor(int currLocation, int nextLocation);

	//DirectedEdge();	
	//virtual ~DirectedEdge();	

	DirectedEdge(Edge *newEdge, bool newIsForward);

	// this is no different from Base class, no need to override
	//Edge* getEdge();

	void setInResult(bool newIsInResult);

	bool isInResult();

	bool isVisited();

	void setVisited(bool newIsVisited);

	void setEdgeRing(EdgeRing *newEdgeRing);

	EdgeRing* getEdgeRing();

	void setMinEdgeRing(EdgeRing *newMinEdgeRing);

	EdgeRing* getMinEdgeRing();

	int getDepth(int position);

	void setDepth(int position, int newDepth);

	int getDepthDelta();

	/// Marks both DirectedEdges attached to a given Edge.
	//
	/// This is used for edges corresponding to lines, which will only
	/// appear oriented in a single direction in the result.
	///
	void setVisitedEdge(bool newIsVisited);


	/** \brief
	 * Each Edge gives rise to a pair of symmetric DirectedEdges,
	 * in opposite directions.
	 *
	 * @return the DirectedEdge for the same Edge but in the
	 *         opposite direction
	 */
	DirectedEdge* getSym();

	bool isForward();

	void setSym(DirectedEdge *de);

	DirectedEdge* getNext();

	void setNext(DirectedEdge *newNext);

	DirectedEdge* getNextMin();

	void setNextMin(DirectedEdge *newNextMin);

	/** \brief
	 * Tells wheter this edge is a Line
	 *
	 * This edge is a line edge if
	 * - at least one of the labels is a line label
	 * - any labels which are not line labels have all Locations = EXTERIOR
	 * 
	 */
	bool isLineEdge();

	/** \brief
	 * Tells wheter this edge is an Area
	 *
	 * This is an interior Area edge if
	 * - its label is an Area label for both Geometries
	 * - and for each Geometry both sides are in the interior.
	 *
	 * @return true if this is an interior Area edge
	 */
	bool isInteriorAreaEdge();

	/** \brief
	 * Set both edge depths. 
	 *
	 * One depth for a given side is provided. 
	 * The other is computed depending on the Location transition and the
	 * depthDelta of the edge.
	 */
	void setEdgeDepths(int position, int newDepth);

	std::string print();

	std::string printEdge();

protected:

	bool isForwardVar;

private:

	bool isInResultVar;

	bool isVisitedVar;

	/// the symmetric edge
	DirectedEdge *sym;

	/// the next edge in the edge ring for the polygon containing this edge
	DirectedEdge *next; 

	/// the next edge in the MinimalEdgeRing that contains this edge
	DirectedEdge *nextMin; 

	/// the EdgeRing that this edge is part of
	EdgeRing *edgeRing; 

	/// the MinimalEdgeRing that this edge is part of
	EdgeRing *minEdgeRing; 

	/** \brief
	 * The depth of each side (position) of this edge.
	 * The 0 element of the array is never used.
	 */
	int depth[3];

	/// Compute the label in the appropriate orientation for this DirEdge
	void computeDirectedLabel();
};

} // namespace geos.geomgraph
} // namespace geos

#ifdef GEOS_INLINE
# include "geos/geomgraph/DirectedEdge.inl"
#endif

#endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H

/**********************************************************************
 * $Log$
 * Revision 1.5  2006/06/14 14:32:20  strk
 * EdgeEnd::getEdge() made non-virtual and inlined.
 *
 * Revision 1.4  2006/05/04 13:38:13  strk
 * doxygen comments cleanup
 *
 * Revision 1.3  2006/03/24 09:52:41  strk
 * USE_INLINE => GEOS_INLINE
 *
 * Revision 1.2  2006/03/15 15:27:23  strk
 * cleanups
 *
 * Revision 1.1  2006/03/09 16:46:49  strk
 * geos::geom namespace definition, first pass at headers split
 *
 **********************************************************************/