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/export.h>
00020 #include <geos/index/strtree/Boundable.h>
00021
00022 #include <vector>
00023
00024 namespace geos {
00025 namespace index {
00026 namespace strtree {
00027
00038 class GEOS_DLL AbstractNode: public Boundable {
00039 private:
00040 std::vector<Boundable*> *childBoundables;
00041 int level;
00042 public:
00043 AbstractNode(int newLevel, int capacity=10);
00044 virtual ~AbstractNode();
00045 inline std::vector<Boundable*>* getChildBoundables() {
00046 return childBoundables;
00047 }
00048
00049 inline const std::vector<Boundable*>* getChildBoundables() const {
00050 return childBoundables;
00051 }
00052
00065 const void* getBounds() const;
00066
00067 int getLevel();
00068
00069 void addChildBoundable(Boundable *childBoundable);
00070
00071 protected:
00072
00073 virtual void* computeBounds() const=0;
00074
00075 mutable void* bounds;
00076 };
00077
00078
00079 }
00080 }
00081 }
00082
00083 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00084
00085
00086
00087
00088
00089
00090
00091