GEOS  3.3.3
quadtree/Root.h
1 /**********************************************************************
2  * $Id: Root.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  * Last port: index/quadtree/Root.java rev 1.7 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_IDX_QUADTREE_ROOT_H
21 #define GEOS_IDX_QUADTREE_ROOT_H
22 
23 #include <geos/export.h>
24 #include <geos/index/quadtree/NodeBase.h> // for inheritance
25 #include <geos/geom/Coordinate.h> // for composition
26 
27 // Forward declarations
28 namespace geos {
29  namespace geom {
30  class Envelope;
31  }
32  namespace index {
33  namespace quadtree {
34  class Node;
35  }
36  }
37 }
38 
39 namespace geos {
40 namespace index { // geos::index
41 namespace quadtree { // geos::index::quadtree
42 
50 class GEOS_DLL Root: public NodeBase {
51 //friend class Unload;
52 
53 private:
54 
55  static const geom::Coordinate origin;
56 
62  void insertContained(Node *tree, const geom::Envelope *itemEnv,
63  void* item);
64 
65 public:
66 
67  Root() {}
68 
69  virtual ~Root() {}
70 
74  void insert(const geom::Envelope *itemEnv, void* item);
75 
76 protected:
77 
78  bool isSearchMatch(const geom::Envelope& /* searchEnv */) const {
79  return true;
80  }
81 
82 };
83 
84 } // namespace geos::index::quadtree
85 } // namespace geos::index
86 } // namespace geos
87 
88 #endif // GEOS_IDX_QUADTREE_ROOT_H
89 
90 /**********************************************************************
91  * $Log$
92  * Revision 1.2 2006/06/12 17:15:29 strk
93  * Removed unused parameters warning
94  *
95  * Revision 1.1 2006/03/22 12:22:50 strk
96  * indexQuadtree.h split
97  *
98  **********************************************************************/
99