AbstractNode.h

00001 /**********************************************************************
00002  * $Id: AbstractNode.h 1971 2007-02-07 00:34:26Z strk $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  *
00009  * This is free software; you can redistribute and/or modify it under
00010  * the terms of the GNU Lesser General Public Licence as published
00011  * by the Free Software Foundation. 
00012  * See the COPYING file for more information.
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> // for inheritance
00020 
00021 #include <vector>
00022 
00023 namespace geos {
00024 namespace index { // geos::index
00025 namespace strtree { // geos::index::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 } // namespace geos::index::strtree
00079 } // namespace geos::index
00080 } // namespace geos
00081 
00082 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00083 
00084 /**********************************************************************
00085  * $Log$
00086  * Revision 1.1  2006/03/21 10:47:34  strk
00087  * indexStrtree.h split
00088  *
00089  **********************************************************************/
00090 

Generated on Fri Mar 27 04:52:33 2009 for GEOS by  doxygen 1.5.4