GEOS 3.2.1
|
00001 /********************************************************************** 00002 * $Id: NodeBase.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_NODEBASE_H 00017 #define GEOS_IDX_BINTREE_NODEBASE_H 00018 00019 #include <geos/export.h> 00020 #include <vector> 00021 00022 // Forward declarations 00023 namespace geos { 00024 namespace index { 00025 namespace bintree { 00026 class Node; 00027 class Interval; 00028 } 00029 } 00030 } 00031 00032 namespace geos { 00033 namespace index { // geos::index 00034 namespace bintree { // geos::index::bintree 00035 00037 class GEOS_DLL NodeBase { 00038 00039 public: 00040 00041 static int getSubnodeIndex(Interval *interval, double centre); 00042 00043 NodeBase(); 00044 00045 virtual ~NodeBase(); 00046 00047 virtual std::vector<void*> *getItems(); 00048 00049 virtual void add(void* item); 00050 00051 virtual std::vector<void*>* addAllItems(std::vector<void*> *newItems); 00052 00053 virtual std::vector<void*>* addAllItemsFromOverlapping(Interval *interval, 00054 std::vector<void*> *resultItems); 00055 00056 virtual int depth(); 00057 00058 virtual int size(); 00059 00060 virtual int nodeSize(); 00061 00062 protected: 00063 00064 std::vector<void*>* items; 00065 00071 Node* subnode[2]; 00072 00073 virtual bool isSearchMatch(Interval *interval)=0; 00074 }; 00075 00076 } // namespace geos::index::bintree 00077 } // namespace geos::index 00078 } // namespace geos 00079 00080 #endif // GEOS_IDX_BINTREE_NODEBASE_H 00081 00082 /********************************************************************** 00083 * $Log$ 00084 * Revision 1.1 2006/03/22 16:01:33 strk 00085 * indexBintree.h header split, classes renamed to match JTS 00086 * 00087 **********************************************************************/ 00088