GEOS  3.9.1dev
index/sweepline/SweepLineEvent.h
Go to the documentation of this file.
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
22 namespace geos {
23 namespace index {
24 namespace sweepline {
25 class SweepLineInterval;
26 }
27 }
28 }
29 
30 namespace geos {
31 namespace index { // geos.index
32 namespace sweepline { // geos:index:sweepline
33 
35 
36 public:
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 
68 private:
69 
70  double xValue;
71 
72  int eventType;
73 
76 
78 
80 
81 };
82 
83 // temp typedefs for backward compatibility
84 //typedef SweepLineEvent indexSweepLineEvent;
85 
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
#define GEOS_DLL
Definition: export.h:28
Basic namespace for all GEOS functionalities.
SweepLineEvent * insertEvent
null if this is an INSERT_EVENT event