GEOS 3.3.8

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

- File List

index/bintree/Node.h
1 /**********************************************************************
2 * $Id: Node.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_IDX_BINTREE_NODE_H
17 #define GEOS_IDX_BINTREE_NODE_H
18
19 #include <geos/export.h>
20 #include <geos/index/bintree/NodeBase.h> // for inheritance
21
22 // Forward declarations
23 namespace geos {
24 namespace index {
25 namespace bintree {
26 class Interval;
27 }
28 }
29 }
30
31 namespace geos {
32 namespace index { // geos::index
33 namespace bintree { // geos::index::bintree
34
36 class GEOS_DLL Node: public NodeBase {
37
38 public:
39
40 static Node* createNode(Interval *itemInterval);
41
42 static Node* createExpanded(Node *node,Interval *addInterval);
43
44 Node(Interval *newInterval,int newLevel);
45
46 ~Node();
47
48 Interval* getInterval();
49
50 Node* getNode(Interval *searchInterval);
51
52 NodeBase* find(Interval *searchInterval);
53
54 void insert(Node *node);
55
56 private:
57
58 Interval *interval;
59
60 double centre;
61
62 int level;
63
64 Node* getSubnode(int index);
65
66 Node* createSubnode(int index);
67
68 protected:
69
70 bool isSearchMatch(Interval *itemInterval);
71 };
72
73 } // namespace geos::index::bintree
74 } // namespace geos::index
75 } // namespace geos
76
77 #endif // GEOS_IDX_BINTREE_NODE_H
78
79 /**********************************************************************
80 * $Log$
81 * Revision 1.1 2006/03/22 16:01:33 strk
82 * indexBintree.h header split, classes renamed to match JTS
83 *
84 **********************************************************************/
85