GEOS 3.11.1
bintree/Root.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#pragma once
16
17#include <geos/export.h>
18#include <geos/index/bintree/NodeBase.h> // for inheritance
19
20// Forward declarations
21namespace geos {
22namespace index {
23namespace bintree {
24class Interval;
25class Node;
26}
27}
28}
29
30namespace geos {
31namespace index { // geos::index
32namespace bintree { // geos::index::bintree
33
40class GEOS_DLL Root: public NodeBase {
41
42private:
43
44 // the singleton root node is centred at the origin.
45 static double origin;
46
47 void insertContained(Node* tree,
48 Interval* itemInterval,
49 void* item);
50
51public:
52
53 Root() {}
54
55 ~Root() override {}
56
63 void insert(Interval* itemInterval, void* item);
64
65protected:
66
67 bool
68 isSearchMatch(Interval* /*interval*/) override
69 {
70 return true;
71 }
72};
73
74} // namespace geos::index::bintree
75} // namespace geos::index
76} // namespace geos
77
Represents an (1-dimensional) closed interval on the Real number line.
Definition: bintree/Interval.h:24
The base class for nodes in a Bintree.
Definition: bintree/NodeBase.h:35
A node of a Bintree.
Definition: index/bintree/Node.h:34
The root node of a single Bintree.
Definition: bintree/Root.h:40
void insert(Interval *itemInterval, void *item)
Basic namespace for all GEOS functionalities.
Definition: geos.h:39