source: josm/trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java@ 9971

Last change on this file since 9971 was 9948, checked in by simon04, 8 years ago

fix #12600 - Orthogonalize: fix ArrayIndexOutOfBoundsException

Regression from r9925.

  • Property svn:eol-style set to native
File size: 25.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9import java.util.ArrayList;
10import java.util.Arrays;
11import java.util.Collection;
12import java.util.Collections;
13import java.util.HashMap;
14import java.util.HashSet;
15import java.util.Iterator;
16import java.util.LinkedList;
17import java.util.List;
18import java.util.Map;
19import java.util.Set;
20
21import javax.swing.JOptionPane;
22
23import org.openstreetmap.josm.Main;
24import org.openstreetmap.josm.command.Command;
25import org.openstreetmap.josm.command.MoveCommand;
26import org.openstreetmap.josm.command.SequenceCommand;
27import org.openstreetmap.josm.data.coor.EastNorth;
28import org.openstreetmap.josm.data.osm.Node;
29import org.openstreetmap.josm.data.osm.OsmPrimitive;
30import org.openstreetmap.josm.data.osm.Way;
31import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
32import org.openstreetmap.josm.gui.Notification;
33import org.openstreetmap.josm.tools.Shortcut;
34
35/**
36 * Tools / Orthogonalize
37 *
38 * Align edges of a way so all angles are angles of 90 or 180 degrees.
39 * See USAGE String below.
40 */
41public final class OrthogonalizeAction extends JosmAction {
42 private static final String USAGE = tr(
43 "<h3>When one or more ways are selected, the shape is adjusted such, that all angles are 90 or 180 degrees.</h3>"+
44 "You can add two nodes to the selection. Then, the direction is fixed by these two reference nodes. "+
45 "(Afterwards, you can undo the movement for certain nodes:<br>"+
46 "Select them and press the shortcut for Orthogonalize / Undo. The default is Shift-Q.)");
47
48 /**
49 * Constructs a new {@code OrthogonalizeAction}.
50 */
51 public OrthogonalizeAction() {
52 super(tr("Orthogonalize Shape"),
53 "ortho",
54 tr("Move nodes so all angles are 90 or 180 degrees"),
55 Shortcut.registerShortcut("tools:orthogonalize", tr("Tool: {0}", tr("Orthogonalize Shape")),
56 KeyEvent.VK_Q,
57 Shortcut.DIRECT), true);
58 putValue("help", ht("/Action/OrthogonalizeShape"));
59 }
60
61 /**
62 * excepted deviation from an angle of 0, 90, 180, 360 degrees
63 * maximum value: 45 degrees
64 *
65 * Current policy is to except just everything, no matter how strange the result would be.
66 */
67 private static final double TOLERANCE1 = Math.toRadians(45.); // within a way
68 private static final double TOLERANCE2 = Math.toRadians(45.); // ways relative to each other
69
70 /**
71 * Remember movements, so the user can later undo it for certain nodes
72 */
73 private static final Map<Node, EastNorth> rememberMovements = new HashMap<>();
74
75 /**
76 * Undo the previous orthogonalization for certain nodes.
77 *
78 * This is useful, if the way shares nodes that you don't like to change, e.g. imports or
79 * work of another user.
80 *
81 * This action can be triggered by shortcut only.
82 */
83 public static class Undo extends JosmAction {
84 /**
85 * Constructor
86 */
87 public Undo() {
88 super(tr("Orthogonalize Shape / Undo"), "ortho",
89 tr("Undo orthogonalization for certain nodes"),
90 Shortcut.registerShortcut("tools:orthogonalizeUndo", tr("Tool: {0}", tr("Orthogonalize Shape / Undo")),
91 KeyEvent.VK_Q,
92 Shortcut.SHIFT),
93 true, "action/orthogonalize/undo", true);
94 }
95
96 @Override
97 public void actionPerformed(ActionEvent e) {
98 if (!isEnabled())
99 return;
100 final Collection<Command> commands = new LinkedList<>();
101 final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
102 try {
103 for (OsmPrimitive p : sel) {
104 if (!(p instanceof Node)) throw new InvalidUserInputException("selected object is not a node");
105 Node n = (Node) p;
106 if (rememberMovements.containsKey(n)) {
107 EastNorth tmp = rememberMovements.get(n);
108 commands.add(new MoveCommand(n, -tmp.east(), -tmp.north()));
109 rememberMovements.remove(n);
110 }
111 }
112 if (!commands.isEmpty()) {
113 Main.main.undoRedo.add(new SequenceCommand(tr("Orthogonalize / Undo"), commands));
114 Main.map.repaint();
115 } else {
116 throw new InvalidUserInputException("Commands are empty");
117 }
118 } catch (InvalidUserInputException ex) {
119 new Notification(
120 tr("Orthogonalize Shape / Undo<br>"+
121 "Please select nodes that were moved by the previous Orthogonalize Shape action!"))
122 .setIcon(JOptionPane.INFORMATION_MESSAGE)
123 .show();
124 }
125 }
126 }
127
128 @Override
129 public void actionPerformed(ActionEvent e) {
130 if (!isEnabled())
131 return;
132 if ("EPSG:4326".equals(Main.getProjection().toString())) {
133 String msg = tr("<html>You are using the EPSG:4326 projection which might lead<br>" +
134 "to undesirable results when doing rectangular alignments.<br>" +
135 "Change your projection to get rid of this warning.<br>" +
136 "Do you want to continue?</html>");
137 if (!ConditionalOptionPaneUtil.showConfirmationDialog(
138 "align_rectangular_4326",
139 Main.parent,
140 msg,
141 tr("Warning"),
142 JOptionPane.YES_NO_OPTION,
143 JOptionPane.QUESTION_MESSAGE,
144 JOptionPane.YES_OPTION))
145 return;
146 }
147
148 final Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
149
150 try {
151 final SequenceCommand command = orthogonalize(sel);
152 Main.main.undoRedo.add(new SequenceCommand(tr("Orthogonalize"), command));
153 Main.map.repaint();
154 } catch (InvalidUserInputException ex) {
155 String msg;
156 if ("usage".equals(ex.getMessage())) {
157 msg = "<h2>" + tr("Usage") + "</h2>" + USAGE;
158 } else {
159 msg = ex.getMessage() + "<br><hr><h2>" + tr("Usage") + "</h2>" + USAGE;
160 }
161 new Notification(msg)
162 .setIcon(JOptionPane.INFORMATION_MESSAGE)
163 .setDuration(Notification.TIME_DEFAULT)
164 .show();
165 }
166 }
167
168 /**
169 * Rectifies the selection
170 * @param selection the selection which should be rectified
171 * @return a rectifying command
172 * @throws InvalidUserInputException if the selection is invalid
173 */
174 static SequenceCommand orthogonalize(Iterable<OsmPrimitive> selection) throws InvalidUserInputException {
175 final List<Node> nodeList = new ArrayList<>();
176 final List<WayData> wayDataList = new ArrayList<>();
177 // collect nodes and ways from the selection
178 for (OsmPrimitive p : selection) {
179 if (p instanceof Node) {
180 nodeList.add((Node) p);
181 } else if (p instanceof Way) {
182 wayDataList.add(new WayData(((Way) p).getNodes()));
183 } else {
184 throw new InvalidUserInputException(tr("Selection must consist only of ways and nodes."));
185 }
186 }
187 if (wayDataList.isEmpty() && nodeList.size() > 2) {
188 final WayData data = new WayData(nodeList);
189 final Collection<Command> commands = orthogonalize(Collections.singletonList(data), Collections.<Node>emptyList());
190 return new SequenceCommand(tr("Orthogonalize"), commands);
191 } else if (wayDataList.isEmpty()) {
192 throw new InvalidUserInputException("usage");
193 } else {
194 if (nodeList.size() == 2 || nodeList.isEmpty()) {
195 OrthogonalizeAction.rememberMovements.clear();
196 final Collection<Command> commands = new LinkedList<>();
197
198 if (nodeList.size() == 2) { // fixed direction
199 commands.addAll(orthogonalize(wayDataList, nodeList));
200 } else if (nodeList.isEmpty()) {
201 List<List<WayData>> groups = buildGroups(wayDataList);
202 for (List<WayData> g: groups) {
203 commands.addAll(orthogonalize(g, nodeList));
204 }
205 } else {
206 throw new IllegalStateException();
207 }
208
209 return new SequenceCommand(tr("Orthogonalize"), commands);
210
211 } else {
212 throw new InvalidUserInputException("usage");
213 }
214 }
215 }
216
217 /**
218 * Collect groups of ways with common nodes in order to orthogonalize each group separately.
219 * @param wayDataList list of ways
220 * @return groups of ways with common nodes
221 */
222 private static List<List<WayData>> buildGroups(List<WayData> wayDataList) {
223 List<List<WayData>> groups = new ArrayList<>();
224 Set<WayData> remaining = new HashSet<>(wayDataList);
225 while (!remaining.isEmpty()) {
226 List<WayData> group = new ArrayList<>();
227 groups.add(group);
228 Iterator<WayData> it = remaining.iterator();
229 WayData next = it.next();
230 it.remove();
231 extendGroupRec(group, next, new ArrayList<>(remaining));
232 remaining.removeAll(group);
233 }
234 return groups;
235 }
236
237 private static void extendGroupRec(List<WayData> group, WayData newGroupMember, List<WayData> remaining) {
238 group.add(newGroupMember);
239 for (int i = 0; i < remaining.size(); ++i) {
240 WayData candidate = remaining.get(i);
241 if (candidate == null) continue;
242 if (!Collections.disjoint(candidate.wayNodes, newGroupMember.wayNodes)) {
243 remaining.set(i, null);
244 extendGroupRec(group, candidate, remaining);
245 }
246 }
247 }
248
249 /**
250 *
251 * Outline:
252 * 1. Find direction of all segments
253 * - direction = 0..3 (right,up,left,down)
254 * - right is not really right, you may have to turn your screen
255 * 2. Find average heading of all segments
256 * - heading = angle of a vector in polar coordinates
257 * - sum up horizontal segments (those with direction 0 or 2)
258 * - sum up vertical segments
259 * - turn the vertical sum by 90 degrees and add it to the horizontal sum
260 * - get the average heading from this total sum
261 * 3. Rotate all nodes by the average heading so that right is really right
262 * and all segments are approximately NS or EW.
263 * 4. If nodes are connected by a horizontal segment: Replace their y-Coordinate by
264 * the mean value of their y-Coordinates.
265 * - The same for vertical segments.
266 * 5. Rotate back.
267 * @param wayDataList list of ways
268 * @param headingNodes list of heading nodes
269 * @return list of commands to perform
270 * @throws InvalidUserInputException if selected ways have an angle different from 90 or 180 degrees
271 **/
272 private static Collection<Command> orthogonalize(List<WayData> wayDataList, List<Node> headingNodes) throws InvalidUserInputException {
273 // find average heading
274 double headingAll;
275 try {
276 if (headingNodes.isEmpty()) {
277 // find directions of the segments and make them consistent between different ways
278 wayDataList.get(0).calcDirections(Direction.RIGHT);
279 double refHeading = wayDataList.get(0).heading;
280 EastNorth totSum = new EastNorth(0., 0.);
281 for (WayData w : wayDataList) {
282 w.calcDirections(Direction.RIGHT);
283 int directionOffset = angleToDirectionChange(w.heading - refHeading, TOLERANCE2);
284 w.calcDirections(Direction.RIGHT.changeBy(directionOffset));
285 if (angleToDirectionChange(refHeading - w.heading, TOLERANCE2) != 0)
286 throw new RuntimeException();
287 totSum = EN.sum(totSum, w.segSum);
288 }
289 headingAll = EN.polar(new EastNorth(0., 0.), totSum);
290 } else {
291 headingAll = EN.polar(headingNodes.get(0).getEastNorth(), headingNodes.get(1).getEastNorth());
292 for (WayData w : wayDataList) {
293 w.calcDirections(Direction.RIGHT);
294 int directionOffset = angleToDirectionChange(w.heading - headingAll, TOLERANCE2);
295 w.calcDirections(Direction.RIGHT.changeBy(directionOffset));
296 }
297 }
298 } catch (RejectedAngleException ex) {
299 throw new InvalidUserInputException(
300 tr("<html>Please make sure all selected ways head in a similar direction<br>"+
301 "or orthogonalize them one by one.</html>"), ex);
302 }
303
304 // put the nodes of all ways in a set
305 final Set<Node> allNodes = new HashSet<>();
306 for (WayData w : wayDataList) {
307 for (Node n : w.wayNodes) {
308 allNodes.add(n);
309 }
310 }
311
312 // the new x and y value for each node
313 final Map<Node, Double> nX = new HashMap<>();
314 final Map<Node, Double> nY = new HashMap<>();
315
316 // calculate the centroid of all nodes
317 // it is used as rotation center
318 EastNorth pivot = new EastNorth(0., 0.);
319 for (Node n : allNodes) {
320 pivot = EN.sum(pivot, n.getEastNorth());
321 }
322 pivot = new EastNorth(pivot.east() / allNodes.size(), pivot.north() / allNodes.size());
323
324 // rotate
325 for (Node n: allNodes) {
326 EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), -headingAll);
327 nX.put(n, tmp.east());
328 nY.put(n, tmp.north());
329 }
330
331 // orthogonalize
332 final Direction[] HORIZONTAL = {Direction.RIGHT, Direction.LEFT};
333 final Direction[] VERTICAL = {Direction.UP, Direction.DOWN};
334 final Direction[][] ORIENTATIONS = {HORIZONTAL, VERTICAL};
335 for (Direction[] orientation : ORIENTATIONS) {
336 final Set<Node> s = new HashSet<>(allNodes);
337 int s_size = s.size();
338 for (int dummy = 0; dummy < s_size; ++dummy) {
339 if (s.isEmpty()) {
340 break;
341 }
342 final Node dummy_n = s.iterator().next(); // pick arbitrary element of s
343
344 final Set<Node> cs = new HashSet<>(); // will contain each node that can be reached from dummy_n
345 cs.add(dummy_n); // walking only on horizontal / vertical segments
346
347 boolean somethingHappened = true;
348 while (somethingHappened) {
349 somethingHappened = false;
350 for (WayData w : wayDataList) {
351 for (int i = 0; i < w.nSeg; ++i) {
352 Node n1 = w.wayNodes.get(i);
353 Node n2 = w.wayNodes.get(i+1);
354 if (Arrays.asList(orientation).contains(w.segDirections[i])) {
355 if (cs.contains(n1) && !cs.contains(n2)) {
356 cs.add(n2);
357 somethingHappened = true;
358 }
359 if (cs.contains(n2) && !cs.contains(n1)) {
360 cs.add(n1);
361 somethingHappened = true;
362 }
363 }
364 }
365 }
366 }
367
368 final Map<Node, Double> nC = (orientation == HORIZONTAL) ? nY : nX;
369
370 double average = 0;
371 for (Node n : cs) {
372 s.remove(n);
373 average += nC.get(n).doubleValue();
374 }
375 average = average / cs.size();
376
377 // if one of the nodes is a heading node, forget about the average and use its value
378 for (Node fn : headingNodes) {
379 if (cs.contains(fn)) {
380 average = nC.get(fn);
381 }
382 }
383
384 // At this point, the two heading nodes (if any) are horizontally aligned, i.e. they
385 // have the same y coordinate. So in general we shouldn't find them in a vertical string
386 // of segments. This can still happen in some pathological cases (see #7889). To avoid
387 // both heading nodes collapsing to one point, we simply skip this segment string and
388 // don't touch the node coordinates.
389 if (orientation == VERTICAL && headingNodes.size() == 2 && cs.containsAll(headingNodes)) {
390 continue;
391 }
392
393 for (Node n : cs) {
394 nC.put(n, average);
395 }
396 }
397 if (!s.isEmpty()) throw new RuntimeException();
398 }
399
400 // rotate back and log the change
401 final Collection<Command> commands = new LinkedList<>();
402 for (Node n: allNodes) {
403 EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
404 tmp = EN.rotateCC(pivot, tmp, headingAll);
405 final double dx = tmp.east() - n.getEastNorth().east();
406 final double dy = tmp.north() - n.getEastNorth().north();
407 if (headingNodes.contains(n)) { // The heading nodes should not have changed
408 final double EPSILON = 1E-6;
409 if (Math.abs(dx) > Math.abs(EPSILON * tmp.east()) ||
410 Math.abs(dy) > Math.abs(EPSILON * tmp.east()))
411 throw new AssertionError();
412 } else {
413 OrthogonalizeAction.rememberMovements.put(n, new EastNorth(dx, dy));
414 commands.add(new MoveCommand(n, dx, dy));
415 }
416 }
417 return commands;
418 }
419
420 /**
421 * Class contains everything we need to know about a single way.
422 */
423 private static class WayData {
424 public final List<Node> wayNodes; // The assigned way
425 public final int nSeg; // Number of Segments of the Way
426 public final int nNode; // Number of Nodes of the Way
427 public Direction[] segDirections; // Direction of the segments
428 // segment i goes from node i to node (i+1)
429 public EastNorth segSum; // (Vector-)sum of all horizontal segments plus the sum of all vertical
430 // segments turned by 90 degrees
431 public double heading; // heading of segSum == approximate heading of the way
432
433 WayData(List<Node> wayNodes) {
434 this.wayNodes = wayNodes;
435 this.nNode = wayNodes.size();
436 this.nSeg = nNode - 1;
437 }
438
439 /**
440 * Estimate the direction of the segments, given the first segment points in the
441 * direction <code>pInitialDirection</code>.
442 * Then sum up all horizontal / vertical segments to have a good guess for the
443 * heading of the entire way.
444 * @param pInitialDirection initial direction
445 * @throws InvalidUserInputException if selected ways have an angle different from 90 or 180 degrees
446 */
447 public void calcDirections(Direction pInitialDirection) throws InvalidUserInputException {
448 final EastNorth[] en = new EastNorth[nNode]; // alias: wayNodes.get(i).getEastNorth() ---> en[i]
449 for (int i = 0; i < nNode; i++) {
450 en[i] = wayNodes.get(i).getEastNorth();
451 }
452 segDirections = new Direction[nSeg];
453 Direction direction = pInitialDirection;
454 segDirections[0] = direction;
455 for (int i = 0; i < nSeg - 1; i++) {
456 double h1 = EN.polar(en[i], en[i+1]);
457 double h2 = EN.polar(en[i+1], en[i+2]);
458 try {
459 direction = direction.changeBy(angleToDirectionChange(h2 - h1, TOLERANCE1));
460 } catch (RejectedAngleException ex) {
461 throw new InvalidUserInputException(tr("Please select ways with angles of approximately 90 or 180 degrees."), ex);
462 }
463 segDirections[i+1] = direction;
464 }
465
466 // sum up segments
467 EastNorth h = new EastNorth(0., 0.);
468 EastNorth v = new EastNorth(0., 0.);
469 for (int i = 0; i < nSeg; ++i) {
470 EastNorth segment = EN.diff(en[i+1], en[i]);
471 if (segDirections[i] == Direction.RIGHT) {
472 h = EN.sum(h, segment);
473 } else if (segDirections[i] == Direction.UP) {
474 v = EN.sum(v, segment);
475 } else if (segDirections[i] == Direction.LEFT) {
476 h = EN.diff(h, segment);
477 } else if (segDirections[i] == Direction.DOWN) {
478 v = EN.diff(v, segment);
479 } else throw new IllegalStateException();
480 }
481 // rotate the vertical vector by 90 degrees (clockwise) and add it to the horizontal vector
482 segSum = EN.sum(h, new EastNorth(v.north(), -v.east()));
483 this.heading = EN.polar(new EastNorth(0., 0.), segSum);
484 }
485 }
486
487 private enum Direction {
488 RIGHT, UP, LEFT, DOWN;
489 public Direction changeBy(int directionChange) {
490 int tmp = (this.ordinal() + directionChange) % 4;
491 if (tmp < 0) {
492 tmp += 4; // the % operator can return negative value
493 }
494 return Direction.values()[tmp];
495 }
496 }
497
498 /**
499 * Make sure angle (up to 2*Pi) is in interval [ 0, 2*Pi ).
500 * @param a angle
501 * @return correct angle
502 */
503 private static double standard_angle_0_to_2PI(double a) {
504 while (a >= 2 * Math.PI) {
505 a -= 2 * Math.PI;
506 }
507 while (a < 0) {
508 a += 2 * Math.PI;
509 }
510 return a;
511 }
512
513 /**
514 * Make sure angle (up to 2*Pi) is in interval ( -Pi, Pi ].
515 * @param a angle
516 * @return correct angle
517 */
518 private static double standard_angle_mPI_to_PI(double a) {
519 while (a > Math.PI) {
520 a -= 2 * Math.PI;
521 }
522 while (a <= -Math.PI) {
523 a += 2 * Math.PI;
524 }
525 return a;
526 }
527
528 /**
529 * Class contains some auxiliary functions
530 */
531 private static final class EN {
532 private EN() {
533 // Hide implicit public constructor for utility class
534 }
535
536 /**
537 * Rotate counter-clock-wise.
538 * @param pivot pivot
539 * @param en original east/north
540 * @param angle angle, in radians
541 * @return new east/north
542 */
543 public static EastNorth rotateCC(EastNorth pivot, EastNorth en, double angle) {
544 double cosPhi = Math.cos(angle);
545 double sinPhi = Math.sin(angle);
546 double x = en.east() - pivot.east();
547 double y = en.north() - pivot.north();
548 double nx = cosPhi * x - sinPhi * y + pivot.east();
549 double ny = sinPhi * x + cosPhi * y + pivot.north();
550 return new EastNorth(nx, ny);
551 }
552
553 public static EastNorth sum(EastNorth en1, EastNorth en2) {
554 return new EastNorth(en1.east() + en2.east(), en1.north() + en2.north());
555 }
556
557 public static EastNorth diff(EastNorth en1, EastNorth en2) {
558 return new EastNorth(en1.east() - en2.east(), en1.north() - en2.north());
559 }
560
561 public static double polar(EastNorth en1, EastNorth en2) {
562 return Math.atan2(en2.north() - en1.north(), en2.east() - en1.east());
563 }
564 }
565
566 /**
567 * Recognize angle to be approximately 0, 90, 180 or 270 degrees.
568 * returns an integral value, corresponding to a counter clockwise turn.
569 * @param a angle, in radians
570 * @param deltaMax maximum tolerance, in radians
571 * @return an integral value, corresponding to a counter clockwise turn
572 * @throws RejectedAngleException in case of invalid angle
573 */
574 private static int angleToDirectionChange(double a, double deltaMax) throws RejectedAngleException {
575 a = standard_angle_mPI_to_PI(a);
576 double d0 = Math.abs(a);
577 double d90 = Math.abs(a - Math.PI / 2);
578 double d_m90 = Math.abs(a + Math.PI / 2);
579 int dirChange;
580 if (d0 < deltaMax) {
581 dirChange = 0;
582 } else if (d90 < deltaMax) {
583 dirChange = 1;
584 } else if (d_m90 < deltaMax) {
585 dirChange = -1;
586 } else {
587 a = standard_angle_0_to_2PI(a);
588 double d180 = Math.abs(a - Math.PI);
589 if (d180 < deltaMax) {
590 dirChange = 2;
591 } else
592 throw new RejectedAngleException();
593 }
594 return dirChange;
595 }
596
597 /**
598 * Exception: unsuited user input
599 */
600 protected static class InvalidUserInputException extends Exception {
601 InvalidUserInputException(String message) {
602 super(message);
603 }
604
605 InvalidUserInputException(String message, Throwable cause) {
606 super(message, cause);
607 }
608 }
609
610 /**
611 * Exception: angle cannot be recognized as 0, 90, 180 or 270 degrees
612 */
613 protected static class RejectedAngleException extends Exception {
614 RejectedAngleException() {
615 super();
616 }
617 }
618
619 @Override
620 protected void updateEnabledState() {
621 setEnabled(getCurrentDataSet() != null && !getCurrentDataSet().getSelected().isEmpty());
622 }
623
624 @Override
625 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
626 setEnabled(selection != null && !selection.isEmpty());
627 }
628}
Note: See TracBrowser for help on using the repository browser.