00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00016 #define GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00017
00018 #include <geos/export.h>
00019 #include <geos/index/strtree/Boundable.h>
00020
00021 #include <vector>
00022
00023 #ifdef _MSC_VER
00024 #pragma warning(push)
00025 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00026 #endif
00027
00028 namespace geos {
00029 namespace index {
00030 namespace strtree {
00031
00042 class GEOS_DLL AbstractNode: public Boundable {
00043 private:
00044 std::vector<Boundable*> childBoundables;
00045 int level;
00046 public:
00047 AbstractNode(int newLevel, int capacity=10);
00048 virtual ~AbstractNode();
00049
00050
00051
00052 inline std::vector<Boundable*>* getChildBoundables() {
00053 return &childBoundables;
00054 }
00055
00056
00057
00058 inline const std::vector<Boundable*>* getChildBoundables() const {
00059 return &childBoundables;
00060 }
00061
00074 const void* getBounds() const;
00075
00076 int getLevel();
00077
00078 void addChildBoundable(Boundable *childBoundable);
00079
00080 protected:
00081
00082 virtual void* computeBounds() const=0;
00083
00084 mutable void* bounds;
00085 };
00086
00087
00088 }
00089 }
00090 }
00091
00092 #ifdef _MSC_VER
00093 #pragma warning(pop)
00094 #endif
00095
00096 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H