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 #ifdef _MSC_VER
00025 #pragma warning(push)
00026 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00027 #endif
00028
00029 namespace geos {
00030 namespace index {
00031 namespace strtree {
00032
00043 class GEOS_DLL AbstractNode: public Boundable {
00044 private:
00045 std::vector<Boundable*> childBoundables;
00046 int level;
00047 public:
00048 AbstractNode(int newLevel, int capacity=10);
00049 virtual ~AbstractNode();
00050
00051
00052
00053 inline std::vector<Boundable*>* getChildBoundables() {
00054 return &childBoundables;
00055 }
00056
00057
00058
00059 inline const std::vector<Boundable*>* getChildBoundables() const {
00060 return &childBoundables;
00061 }
00062
00075 const void* getBounds() const;
00076
00077 int getLevel();
00078
00079 void addChildBoundable(Boundable *childBoundable);
00080
00081 protected:
00082
00083 virtual void* computeBounds() const=0;
00084
00085 mutable void* bounds;
00086 };
00087
00088
00089 }
00090 }
00091 }
00092
00093 #ifdef _MSC_VER
00094 #pragma warning(pop)
00095 #endif
00096
00097 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00098
00099
00100
00101
00102
00103
00104
00105