00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00017 #define GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00018
00019 #include <geos/index/strtree/Boundable.h>
00020
00021 #include <vector>
00022
00023 namespace geos {
00024 namespace index {
00025 namespace strtree {
00026
00037 class AbstractNode: public Boundable {
00038 private:
00039 std::vector<Boundable*> *childBoundables;
00040 int level;
00041 public:
00042 AbstractNode(int newLevel, int capacity=10);
00043 virtual ~AbstractNode();
00044 inline std::vector<Boundable*>* getChildBoundables() {
00045 return childBoundables;
00046 }
00047
00048 inline const std::vector<Boundable*>* getChildBoundables() const {
00049 return childBoundables;
00050 }
00051
00064 const void* getBounds() const;
00065
00066 int getLevel();
00067
00068 void addChildBoundable(Boundable *childBoundable);
00069
00070 protected:
00071
00072 virtual void* computeBounds() const=0;
00073
00074 mutable void* bounds;
00075 };
00076
00077
00078 }
00079 }
00080 }
00081
00082 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00083
00084
00085
00086
00087
00088
00089
00090