GEOS
3.3.6
|
00001 /********************************************************************** 00002 * $Id: Root.h 2556 2009-06-06 22:22:28Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2006 Refractions Research Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 **********************************************************************/ 00015 00016 #ifndef GEOS_IDX_BINTREE_ROOT_H 00017 #define GEOS_IDX_BINTREE_ROOT_H 00018 00019 #include <geos/export.h> 00020 #include <geos/index/bintree/NodeBase.h> // for inheritance 00021 00022 // Forward declarations 00023 namespace geos { 00024 namespace index { 00025 namespace bintree { 00026 class Interval; 00027 class Node; 00028 } 00029 } 00030 } 00031 00032 namespace geos { 00033 namespace index { // geos::index 00034 namespace bintree { // geos::index::bintree 00035 00042 class GEOS_DLL Root: public NodeBase { 00043 00044 private: 00045 00046 // the singleton root node is centred at the origin. 00047 static double origin; 00048 00049 void insertContained(Node *tree, 00050 Interval *itemInterval, 00051 void* item); 00052 00053 public: 00054 00055 Root() {} 00056 00057 ~Root() {} 00058 00065 void insert(Interval *itemInterval, void* item); 00066 00067 protected: 00068 00069 bool isSearchMatch(Interval* /*interval*/) { return true; } 00070 }; 00071 00072 } // namespace geos::index::bintree 00073 } // namespace geos::index 00074 } // namespace geos 00075 00076 #endif // GEOS_IDX_BINTREE_ROOT_H 00077 00078 /********************************************************************** 00079 * $Log$ 00080 * Revision 1.1 2006/03/22 16:01:33 strk 00081 * indexBintree.h header split, classes renamed to match JTS 00082 * 00083 **********************************************************************/ 00084