GEOS: IntervalRTreeBranchNode.h Source File

GEOS 3.5.0

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

- File List

IntervalRTreeBranchNode.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
16 #ifndef GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H
17 #define GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H
18
19 #include <geos/index/intervalrtree/IntervalRTreeNode.h> // inherited
20
21 #include <algorithm>
22
23 // forward declarations
24 namespace geos {
25 namespace index {
26 class ItemVisitor;
27 }
28 }
29
30
31 namespace geos {
32 namespace index {
33 namespace intervalrtree {
34
35 class IntervalRTreeBranchNode : public IntervalRTreeNode
36 {
37 private:
38 const IntervalRTreeNode * node1;
39 const IntervalRTreeNode * node2;
40
41 //void buildExtent( IntervalRTreeNode * n1, IntervalRTreeNode * n2)
42 //{
43 // min = std::min( n1->min, n2->min);
44 // max = std::max( n1->max, n2->max);
45 //}
46
47 protected:
48 public:
49 IntervalRTreeBranchNode( const IntervalRTreeNode * n1, const IntervalRTreeNode * n2)
50 : IntervalRTreeNode( std::min( n1->getMin(), n2->getMin()), std::max( n1->getMax(), n2->getMax())),
51 node1( n1),
52 node2( n2)
53 { }
54
55 ~IntervalRTreeBranchNode()
56 {
57 delete node1;
58 delete node2;
59 }
60
61
62 void query(double queryMin, double queryMax, index::ItemVisitor * visitor) const;
63 };
64
65 } // geos::intervalrtree
66 } // geos::index
67 } // geos
68
69 #endif // GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H
70
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25