GEOS 3.3.8

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

index/sweepline/SweepLineEvent.h
1 /**********************************************************************
2 * $Id: SweepLineEvent.h 2556 2009-06-06 22:22:28Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
17 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
18
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
34 class GEOS_DLL SweepLineEvent {
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 int getDeleteEventIndex();
53
54 void setDeleteEventIndex(int 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
75 SweepLineEvent *insertEvent;
76
77 int deleteEventIndex;
78
79 SweepLineInterval *sweepInt;
80
81 };
82
83 // temp typedefs for backward compatibility
84 //typedef SweepLineEvent indexSweepLineEvent;
85
86 struct 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
98
99 /**********************************************************************
100 * $Log$
101 * Revision 1.1 2006/03/21 10:01:30 strk
102 * indexSweepline.h header split
103 *
104 **********************************************************************/
105