GEOS: Node.h Source File

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

- File List

# Node.h

    00001 /**********************************************************************
    00002  * $Id: Node.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_IDX_BINTREE_NODE_H
    00017 #define GEOS_IDX_BINTREE_NODE_H
    00018
    00019 #include <geos/export.h>
    00020 #include <geos/index/bintree/NodeBase.h> // for inheritance
    00021
    00022 // Forward declarations
    00023 namespace geos {
    00024         namespace index {
    00025                 namespace bintree {
    00026                         class Interval;
    00027                 }
    00028         }
    00029 }
    00030
    00031 namespace geos {
    00032 namespace index { // geos::index
    00033 namespace bintree { // geos::index::bintree
    00034
    00036 class GEOS_DLL Node: public NodeBase {
    00037
    00038 public:
    00039
    00040         static Node* createNode(Interval *itemInterval);
    00041
    00042         static Node* createExpanded(Node *node,Interval *addInterval);
    00043
    00044         Node(Interval *newInterval,int newLevel);
    00045
    00046         ~Node();
    00047
    00048         Interval* getInterval();
    00049
    00050         Node* getNode(Interval *searchInterval);
    00051
    00052         NodeBase* find(Interval *searchInterval);
    00053
    00054         void insert(Node *node);
    00055
    00056 private:
    00057
    00058         Interval *interval;
    00059
    00060         double centre;
    00061
    00062         int level;
    00063
    00064         Node* getSubnode(int index);
    00065
    00066         Node* createSubnode(int index);
    00067
    00068 protected:
    00069
    00070         bool isSearchMatch(Interval *itemInterval);
    00071 };
    00072
    00073 } // namespace geos::index::bintree
    00074 } // namespace geos::index
    00075 } // namespace geos
    00076
    00077 #endif // GEOS_IDX_BINTREE_NODE_H
    00078
    00079 /**********************************************************************
    00080  * $Log$
    00081  * Revision 1.1  2006/03/22 16:01:33  strk
    00082  * indexBintree.h header split, classes renamed to match JTS
    00083  *
    00084  **********************************************************************/
    00085