Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

AbstractNode.h

00001 /**********************************************************************
00002  * $Id: AbstractNode.h 2556 2009-06-06 22:22:28Z 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/export.h>
00020 #include <geos/index/strtree/Boundable.h> // for inheritance
00021 
00022 #include <vector>
00023 
00024 namespace geos {
00025 namespace index { // geos::index
00026 namespace strtree { // geos::index::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 } // namespace geos::index::strtree
00080 } // namespace geos::index
00081 } // namespace geos
00082 
00083 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00084 
00085 /**********************************************************************
00086  * $Log$
00087  * Revision 1.1  2006/03/21 10:47:34  strk
00088  * indexStrtree.h split
00089  *
00090  **********************************************************************/
00091 

Generated on Thu Jun 11 06:17:00 2009 for GEOS by  doxygen 1.4.4