- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# AbstractNode.h

    00001 /**********************************************************************
    00002  * $Id: AbstractNode.h 2958 2010-03-29 11:29:40Z mloskot $
    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 #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 { // geos::index
    00031 namespace strtree { // geos::index::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         // TODO: change signature to return by ref,
    00052         // document ownership of the return
    00053         inline std::vector<Boundable*>* getChildBoundables() {
    00054                 return &childBoundables;
    00055         }
    00056
    00057         // TODO: change signature to return by ref,
    00058         // document ownership of the return
    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 } // namespace geos::index::strtree
    00090 } // namespace geos::index
    00091 } // namespace geos
    00092
    00093 #ifdef _MSC_VER
    00094 #pragma warning(pop)
    00095 #endif
    00096
    00097 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
    00098
    00099 /**********************************************************************
    00100  * $Log$
    00101  * Revision 1.1  2006/03/21 10:47:34  strk
    00102  * indexStrtree.h split
    00103  *
    00104  **********************************************************************/
    00105