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
00046
00047
00048 inline std::vector<Boundable*>* getChildBoundables() {
00049 return &childBoundables;
00050 }
00051
00052
00053
00054 inline const std::vector<Boundable*>* getChildBoundables() const {
00055 return &childBoundables;
00056 }
00057
00070 const void* getBounds() const;
00071
00072 int getLevel();
00073
00074 void addChildBoundable(Boundable *childBoundable);
00075
00076 protected:
00077
00078 virtual void* computeBounds() const=0;
00079
00080 mutable void* bounds;
00081 };
00082
00083
00084 }
00085 }
00086 }
00087
00088 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00089
00090
00091
00092
00093
00094
00095
00096