This file is indexed.

/usr/include/geos/geomgraph/Label.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
/**********************************************************************
 * $Id: Label.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/Label.java rev. 1.8 (JTS-1.10)
 *
 **********************************************************************/


#ifndef GEOS_GEOMGRAPH_LABEL_H
#define GEOS_GEOMGRAPH_LABEL_H

#include <geos/export.h>
#include <geos/geomgraph/TopologyLocation.h> 

#include <geos/inline.h>

#include <iosfwd> // for operator<<

namespace geos {
namespace geomgraph { // geos.geomgraph

/** \brief
 * A <code>Label</code> indicates the topological relationship of a component
 * of a topology graph to a given <code>Geometry</code>.
 * This class supports labels for relationships to two <code>Geometry</code>s,
 * which is sufficient for algorithms for binary operations.
 * 
 * Topology graphs support the concept of labeling nodes and edges in the graph.
 * The label of a node or edge specifies its topological relationship to one or
 * more geometries.  (In fact, since JTS operations have only two arguments labels
 * are required for only two geometries).  A label for a node or edge has one or
 * two elements, depending on whether the node or edge occurs in one or both of the
 * input <code>Geometry</code>s.  Elements contain attributes which categorize the
 * topological location of the node or edge relative to the parent
 * <code>Geometry</code>; that is, whether the node or edge is in the interior,
 * boundary or exterior of the <code>Geometry</code>.  Attributes have a value
 * from the set <code>{Interior, Boundary, Exterior}</code>.  In a node each
 * element has  a single attribute <code>&lt;On&gt;</code>.  For an edge each element has a
 * triplet of attributes <code>&lt;Left, On, Right&gt;</code>.
 *
 * It is up to the client code to associate the 0 and 1 <code>TopologyLocation</code>s
 * with specific geometries.
 *
 */
class GEOS_DLL Label {

public:

	friend std::ostream& operator<< (std::ostream&, const Label&);

	/** \brief
	 * Converts a Label to a Line label
	 * (that is, one with no side Locations)
	 *
	 * Returns a newly allocated object,
	 * responsibility of it to the caller.
	 */
	static Label* toLineLabel(const Label& label);

	/** \brief
	 * Construct a Label with a single location for both Geometries.
	 */
	Label(int onLoc);

	/** \brief
	 * Construct a Label with the location specified
	 * for the given Geometry.
	 * 
	 * Other geometry location will be set to
	 * Location::UNDEF.
	 */
	Label(int geomIndex, int onLoc);

	/** \brief
	 * Construct a Label with On, Left and Right locations for both Geometries.
	 *
	 * Initialize the locations for both Geometries to the given values.
	 */
	Label(int onLoc, int leftLoc, int rightLoc);

	/// Copy ctor
	Label(const Label &l);

	/** \brief
	 * Initialize the locations to Location::UNDEF
	 */
	Label();

	/// I'd drop the 'virtual' modifier here --strk 2006-04-06
	virtual ~Label();

	/** \brief
	 * Construct a Label with On, Left and Right locations for the
	 * given Geometries.
	 * Initialize the locations for the other Geometry to
	 * Location::UNDEF
	 */
	Label(int geomIndex, int onLoc, int leftLoc, int rightLoc);

	void flip();

	int getLocation(int geomIndex, int posIndex) const;

	int getLocation(int geomIndex) const;

	void setLocation(int geomIndex, int posIndex, int location);

	void setLocation(int geomIndex, int location);

	void setAllLocations(int geomIndex, int location);

	void setAllLocationsIfNull(int geomIndex, int location);

	void setAllLocationsIfNull(int location);

	/** \brief
	 * Merge this label with another one.
	 *
	 * Merging updates any null attributes of this label with the attributes
	 * from lbl
	 */
	void merge(const Label &lbl);

	int getGeometryCount() const;

	bool isNull(int geomIndex) const;

	bool isAnyNull(int geomIndex) const;

	bool isArea() const;

	bool isArea(int geomIndex) const;

	bool isLine(int geomIndex) const;

	bool isEqualOnSide(const Label &lbl, int side) const;

	bool allPositionsEqual(int geomIndex, int loc) const;

	/** \brief
	 * Converts one GeometryLocation to a Line location
	 */
	void toLine(int geomIndex);

	std::string toString() const;

protected:

	TopologyLocation elt[2];
};

std::ostream& operator<< (std::ostream&, const Label&);

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


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

#endif // ifndef GEOS_GEOMGRAPH_LABEL_H

/**********************************************************************
 * $Log$
 * Revision 1.3  2006/04/06 09:01:37  strk
 * Doxygen comments, port info, operator<<, assertion checking
 *
 * Revision 1.2  2006/03/24 09:52:41  strk
 * USE_INLINE => GEOS_INLINE
 *
 * Revision 1.1  2006/03/09 16:46:49  strk
 * geos::geom namespace definition, first pass at headers split
 *
 **********************************************************************/