GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: index/quadtree/Root.java rev 1.7 (JTS-1.10) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_IDX_QUADTREE_ROOT_H 00020 #define GEOS_IDX_QUADTREE_ROOT_H 00021 00022 #include <geos/export.h> 00023 #include <geos/index/quadtree/NodeBase.h> // for inheritance 00024 #include <geos/geom/Coordinate.h> // for composition 00025 00026 // Forward declarations 00027 namespace geos { 00028 namespace geom { 00029 class Envelope; 00030 } 00031 namespace index { 00032 namespace quadtree { 00033 class Node; 00034 } 00035 } 00036 } 00037 00038 namespace geos { 00039 namespace index { // geos::index 00040 namespace quadtree { // geos::index::quadtree 00041 00049 class GEOS_DLL Root: public NodeBase { 00050 //friend class Unload; 00051 00052 private: 00053 00054 static const geom::Coordinate origin; 00055 00061 void insertContained(Node *tree, const geom::Envelope *itemEnv, 00062 void* item); 00063 00064 public: 00065 00066 Root() {} 00067 00068 virtual ~Root() {} 00069 00073 void insert(const geom::Envelope *itemEnv, void* item); 00074 00075 protected: 00076 00077 bool isSearchMatch(const geom::Envelope& /* searchEnv */) const { 00078 return true; 00079 } 00080 00081 }; 00082 00083 } // namespace geos::index::quadtree 00084 } // namespace geos::index 00085 } // namespace geos 00086 00087 #endif // GEOS_IDX_QUADTREE_ROOT_H