GEOS: NodeBase.h Source File

GEOS 3.3.8

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

- File List

bintree/NodeBase.h
1 /**********************************************************************
2 * $Id: NodeBase.h 2556 2009-06-06 22:22:28Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_IDX_BINTREE_NODEBASE_H
17 #define GEOS_IDX_BINTREE_NODEBASE_H
18
19 #include <geos/export.h>
20 #include <vector>
21
22 // Forward declarations
23 namespace geos {
24 namespace index {
25 namespace bintree {
26 class Node;
27 class Interval;
28 }
29 }
30 }
31
32 namespace geos {
33 namespace index { // geos::index
34 namespace bintree { // geos::index::bintree
35
37 class GEOS_DLL NodeBase {
38
39 public:
40
41 static int getSubnodeIndex(Interval *interval, double centre);
42
43 NodeBase();
44
45 virtual ~NodeBase();
46
47 virtual std::vector<void*> *getItems();
48
49 virtual void add(void* item);
50
51 virtual std::vector<void*>* addAllItems(std::vector<void*> *newItems);
52
53 virtual std::vector<void*>* addAllItemsFromOverlapping(Interval *interval,
54 std::vector<void*> *resultItems);
55
56 virtual int depth();
57
58 virtual int size();
59
60 virtual int nodeSize();
61
62 protected:
63
64 std::vector<void*>* items;
65
71 Node* subnode[2];
72
73 virtual bool isSearchMatch(Interval *interval)=0;
74 };
75
76 } // namespace geos::index::bintree
77 } // namespace geos::index
78 } // namespace geos
79
80 #endif // GEOS_IDX_BINTREE_NODEBASE_H
81
82 /**********************************************************************
83 * $Log$
84 * Revision 1.1 2006/03/22 16:01:33 strk
85 * indexBintree.h header split, classes renamed to match JTS
86 *
87 **********************************************************************/
88