GEOS 3.4.2

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

- File List

bintree/Key.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_IDX_BINTREE_KEY_H
16 #define GEOS_IDX_BINTREE_KEY_H
17
18 #include <geos/export.h>
19
20 // Forward declarations
21 namespace geos {
22 namespace index {
23 namespace bintree {
24 class Interval;
25 }
26 }
27 }
28
29 namespace geos {
30 namespace index { // geos::index
31 namespace bintree { // geos::index::bintree
32
39 class GEOS_DLL Key {
40
41 public:
42
43 static int computeLevel(Interval *newInterval);
44
45 Key(Interval *newInterval);
46
47 ~Key();
48
49 double getPoint();
50
51 int getLevel();
52
53 Interval* getInterval();
54
55 void computeKey(Interval *itemInterval);
56
57 private:
58
59 // the fields which make up the key
60 double pt;
61 int level;
62
63 // auxiliary data which is derived from the key for use in computation
64 Interval *interval;
65
66 void computeInterval(int level, Interval *itemInterval);
67 };
68
69 } // namespace geos::index::bintree
70 } // namespace geos::index
71 } // namespace geos
72
73 #endif // GEOS_IDX_BINTREE_KEY_H
74