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 #ifndef GEOS_IDX_BINTREE_ROOT_H 00016 #define GEOS_IDX_BINTREE_ROOT_H 00017 00018 #include <geos/export.h> 00019 #include <geos/index/bintree/NodeBase.h> // for inheritance 00020 00021 // Forward declarations 00022 namespace geos { 00023 namespace index { 00024 namespace bintree { 00025 class Interval; 00026 class Node; 00027 } 00028 } 00029 } 00030 00031 namespace geos { 00032 namespace index { // geos::index 00033 namespace bintree { // geos::index::bintree 00034 00041 class GEOS_DLL Root: public NodeBase { 00042 00043 private: 00044 00045 // the singleton root node is centred at the origin. 00046 static double origin; 00047 00048 void insertContained(Node *tree, 00049 Interval *itemInterval, 00050 void* item); 00051 00052 public: 00053 00054 Root() {} 00055 00056 ~Root() {} 00057 00064 void insert(Interval *itemInterval, void* item); 00065 00066 protected: 00067 00068 bool isSearchMatch(Interval* /*interval*/) { return true; } 00069 }; 00070 00071 } // namespace geos::index::bintree 00072 } // namespace geos::index 00073 } // namespace geos 00074 00075 #endif // GEOS_IDX_BINTREE_ROOT_H 00076