GEOS 3.9.1
index/sweepline/SweepLineEvent.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14
15#ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
16#define GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
17
18#include <cstddef>
19#include <geos/export.h>
20
21// Forward declarations
22namespace geos {
23namespace index {
24namespace sweepline {
25class SweepLineInterval;
26}
27}
28}
29
30namespace geos {
31namespace index { // geos.index
32namespace sweepline { // geos:index:sweepline
33
34class GEOS_DLL SweepLineEvent {
35
36public:
37
38 enum {
39 INSERT_EVENT = 1,
40 DELETE_EVENT
41 };
42
43 SweepLineEvent(double x, SweepLineEvent* newInsertEvent,
44 SweepLineInterval* newSweepInt);
45
46 bool isInsert();
47
48 bool isDelete();
49
50 SweepLineEvent* getInsertEvent();
51
52 size_t getDeleteEventIndex();
53
54 void setDeleteEventIndex(size_t newDeleteEventIndex);
55
56 SweepLineInterval* getInterval();
57
64 int compareTo(const SweepLineEvent* pe) const;
65
66 //int compareTo(void *o) const;
67
68private:
69
70 double xValue;
71
72 int eventType;
73
75 SweepLineEvent* insertEvent;
76
77 size_t deleteEventIndex;
78
79 SweepLineInterval* sweepInt;
80
81};
82
83// temp typedefs for backward compatibility
84//typedef SweepLineEvent indexSweepLineEvent;
85
86struct GEOS_DLL SweepLineEventLessThen {
87 bool operator()(const SweepLineEvent* first, const SweepLineEvent* second) const;
88};
89
90//bool isleLessThen(SweepLineEvent *first, SweepLineEvent *second);
91
92
93} // namespace geos:index:sweepline
94} // namespace geos:index
95} // namespace geos
96
97#endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26