• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

AbstractNode.h

00001 /**********************************************************************
00002  * $Id: AbstractNode.h 2724 2009-11-19 18:52:45Z 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 
00046         // TODO: change signature to return by ref,
00047         // document ownership of the return
00048         inline std::vector<Boundable*>* getChildBoundables() {
00049                 return &childBoundables;
00050         }
00051 
00052         // TODO: change signature to return by ref,
00053         // document ownership of the return
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 } // namespace geos::index::strtree
00085 } // namespace geos::index
00086 } // namespace geos
00087 
00088 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
00089 
00090 /**********************************************************************
00091  * $Log$
00092  * Revision 1.1  2006/03/21 10:47:34  strk
00093  * indexStrtree.h split
00094  *
00095  **********************************************************************/
00096 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1