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

# NodeBase.h

    00001 /**********************************************************************
    00002  * $Id: NodeBase.h 1820 2006-09-06 16:54:23Z 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_IDX_BINTREE_NODEBASE_H
    00017 #define GEOS_IDX_BINTREE_NODEBASE_H
    00018
    00019 #include <vector>
    00020
    00021 // Forward declarations
    00022 namespace geos {
    00023         namespace index {
    00024                 namespace bintree {
    00025                         class Node;
    00026                         class Interval;
    00027                 }
    00028         }
    00029 }
    00030
    00031 namespace geos {
    00032 namespace index { // geos::index
    00033 namespace bintree { // geos::index::bintree
    00034
    00036 class NodeBase {
    00037
    00038 public:
    00039
    00040         static int getSubnodeIndex(Interval *interval, double centre);
    00041
    00042         NodeBase();
    00043
    00044         virtual ~NodeBase();
    00045
    00046         virtual std::vector<void*> *getItems();
    00047
    00048         virtual void add(void* item);
    00049
    00050         virtual std::vector<void*>* addAllItems(std::vector<void*> *newItems);
    00051
    00052         virtual std::vector<void*>* addAllItemsFromOverlapping(Interval *interval,
    00053                         std::vector<void*> *resultItems);
    00054
    00055         virtual int depth();
    00056
    00057         virtual int size();
    00058
    00059         virtual int nodeSize();
    00060
    00061 protected:
    00062
    00063         std::vector<void*>* items;
    00064
    00070         Node* subnode[2];
    00071
    00072         virtual bool isSearchMatch(Interval *interval)=0;
    00073 };
    00074
    00075 } // namespace geos::index::bintree
    00076 } // namespace geos::index
    00077 } // namespace geos
    00078
    00079 #endif // GEOS_IDX_BINTREE_NODEBASE_H
    00080
    00081 /**********************************************************************
    00082  * $Log$
    00083  * Revision 1.1  2006/03/22 16:01:33  strk
    00084  * indexBintree.h header split, classes renamed to match JTS
    00085  *
    00086  **********************************************************************/
    00087