00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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
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 {
00034 namespace 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 }
00077 }
00078 }
00079
00080 #endif // GEOS_IDX_BINTREE_NODEBASE_H
00081
00082
00083
00084
00085
00086
00087
00088