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

- File List

# SweepLineEvent.h

    00001 /**********************************************************************
    00002  * $Id: SweepLineEvent.h 2556 2009-06-06 22:22:28Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************/
    00015
    00016 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
    00017 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
    00018
    00019 #include <geos/export.h>
    00020
    00021 // Forward declarations
    00022 namespace geos {
    00023         namespace index {
    00024                 namespace sweepline {
    00025                         class SweepLineInterval;
    00026                 }
    00027         }
    00028 }
    00029
    00030 namespace geos {
    00031 namespace index { // geos.index
    00032 namespace sweepline { // geos:index:sweepline
    00033
    00034 class GEOS_DLL SweepLineEvent {
    00035
    00036 public:
    00037
    00038         enum {
    00039                 INSERT_EVENT = 1,
    00040                 DELETE_EVENT
    00041         };
    00042
    00043         SweepLineEvent(double x, SweepLineEvent *newInsertEvent,
    00044                         SweepLineInterval *newSweepInt);
    00045
    00046         bool isInsert();
    00047
    00048         bool isDelete();
    00049
    00050         SweepLineEvent* getInsertEvent();
    00051
    00052         int getDeleteEventIndex();
    00053
    00054         void setDeleteEventIndex(int newDeleteEventIndex);
    00055
    00056         SweepLineInterval* getInterval();
    00057
    00064         int compareTo(const SweepLineEvent *pe) const;
    00065
    00066         //int compareTo(void *o) const;
    00067
    00068 private:
    00069
    00070         double xValue;
    00071
    00072         int eventType;
    00073
    00075         SweepLineEvent *insertEvent;
    00076
    00077         int deleteEventIndex;
    00078
    00079         SweepLineInterval *sweepInt;
    00080
    00081 };
    00082
    00083 // temp typedefs for backward compatibility
    00084 //typedef SweepLineEvent indexSweepLineEvent;
    00085
    00086 struct GEOS_DLL  SweepLineEventLessThen {
    00087         bool operator() (const SweepLineEvent* first, const SweepLineEvent* second) const;
    00088 };
    00089
    00090 //bool isleLessThen(SweepLineEvent *first, SweepLineEvent *second);
    00091
    00092
    00093 } // namespace geos:index:sweepline
    00094 } // namespace geos:index
    00095 } // namespace geos
    00096
    00097 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEEVENT_H
    00098
    00099 /**********************************************************************
    00100  * $Log$
    00101  * Revision 1.1  2006/03/21 10:01:30  strk
    00102  * indexSweepline.h header split
    00103  *
    00104  **********************************************************************/
    00105