NodeBase.h

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_NODEBASE_H
00016 #define GEOS_IDX_BINTREE_NODEBASE_H
00017 
00018 #include <geos/export.h>
00019 #include <vector>
00020 
00021 // Forward declarations
00022 namespace geos {
00023         namespace index { 
00024                 namespace bintree { 
00025                         class Node;
00026                         class Interval;
00027                 }
00028         }
00029 }
00030 
00031 namespace geos {
00032 namespace index { // geos::index
00033 namespace bintree { // geos::index::bintree
00034 
00036 class GEOS_DLL NodeBase {
00037 
00038 public:
00039 
00040         static int getSubnodeIndex(Interval *interval, double centre);
00041 
00042         NodeBase();
00043 
00044         virtual ~NodeBase();
00045 
00046         virtual std::vector<void*> *getItems();
00047 
00048         virtual void add(void* item);
00049 
00050         virtual std::vector<void*>* addAllItems(std::vector<void*> *newItems);
00051 
00052         virtual std::vector<void*>* addAllItemsFromOverlapping(Interval *interval,
00053                         std::vector<void*> *resultItems);
00054 
00055         virtual int depth();
00056 
00057         virtual int size();
00058 
00059         virtual int nodeSize();
00060 
00061 protected:      
00062 
00063         std::vector<void*>* items;
00064 
00070         Node* subnode[2];
00071 
00072         virtual bool isSearchMatch(Interval *interval)=0;
00073 };
00074 
00075 } // namespace geos::index::bintree
00076 } // namespace geos::index
00077 } // namespace geos
00078 
00079 #endif // GEOS_IDX_BINTREE_NODEBASE_H
00080 

Generated on 30 Dec 2015 for GEOS by  doxygen 1.4.7