# Key.h

    00001 /**********************************************************************
    00002  * $Id: Key.h 1820 2006-09-06 16:54:23Z mloskot $
    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_IDX_BINTREE_KEY_H
    00017 #define GEOS_IDX_BINTREE_KEY_H
    00018
    00019 // Forward declarations
    00020 namespace geos {
    00021         namespace index {
    00022                 namespace bintree {
    00023                         class Interval;
    00024                 }
    00025         }
    00026 }
    00027
    00028 namespace geos {
    00029 namespace index { // geos::index
    00030 namespace bintree { // geos::index::bintree
    00031
    00038 class Key {
    00039
    00040 public:
    00041
    00042         static int computeLevel(Interval *newInterval);
    00043
    00044         Key(Interval *newInterval);
    00045
    00046         ~Key();
    00047
    00048         double getPoint();
    00049
    00050         int getLevel();
    00051
    00052         Interval* getInterval();
    00053
    00054         void computeKey(Interval *itemInterval);
    00055
    00056 private:
    00057
    00058         // the fields which make up the key
    00059         double pt;
    00060         int level;
    00061
    00062         // auxiliary data which is derived from the key for use in computation
    00063         Interval *interval;
    00064
    00065         void computeInterval(int level, Interval *itemInterval);
    00066 };
    00067
    00068 } // namespace geos::index::bintree
    00069 } // namespace geos::index
    00070 } // namespace geos
    00071
    00072 #endif // GEOS_IDX_BINTREE_KEY_H
    00073
    00074 /**********************************************************************
    00075  * $Log$
    00076  * Revision 1.1  2006/03/22 16:01:33  strk
    00077  * indexBintree.h header split, classes renamed to match JTS
    00078  *
    00079  **********************************************************************/
    00080