GEOS
3.3.2
|
00001 /********************************************************************** 00002 * $Id: IntervalRTreeBranchNode.h 2263 2009-01-29 18:56:00Z mloskot $ 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 00017 #ifndef GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H 00018 #define GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H 00019 00020 #include <geos/index/intervalrtree/IntervalRTreeNode.h> // inherited 00021 00022 #include <algorithm> 00023 00024 // forward declarations 00025 namespace geos { 00026 namespace index { 00027 class ItemVisitor; 00028 } 00029 } 00030 00031 00032 namespace geos { 00033 namespace index { 00034 namespace intervalrtree { 00035 00036 class IntervalRTreeBranchNode : public IntervalRTreeNode 00037 { 00038 private: 00039 const IntervalRTreeNode * node1; 00040 const IntervalRTreeNode * node2; 00041 00042 //void buildExtent( IntervalRTreeNode * n1, IntervalRTreeNode * n2) 00043 //{ 00044 // min = std::min( n1->min, n2->min); 00045 // max = std::max( n1->max, n2->max); 00046 //} 00047 00048 protected: 00049 public: 00050 IntervalRTreeBranchNode( const IntervalRTreeNode * n1, const IntervalRTreeNode * n2) 00051 : IntervalRTreeNode( std::min( n1->getMin(), n2->getMin()), std::max( n1->getMax(), n2->getMax())), 00052 node1( n1), 00053 node2( n2) 00054 { } 00055 00056 ~IntervalRTreeBranchNode() 00057 { 00058 delete node1; 00059 delete node2; 00060 } 00061 00062 00063 void query(double queryMin, double queryMax, index::ItemVisitor * visitor) const; 00064 }; 00065 00066 } // geos::intervalrtree 00067 } // geos::index 00068 } // geos 00069 00070 #endif // GEOS_INDEX_INTERVALRTREE_INTERVALRTREEBRANCHNODE_H 00071 /********************************************************************** 00072 * $Log$ 00073 **********************************************************************/ 00074