GEOS 3.6.2
AbstractNode.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14
15#ifndef GEOS_INDEX_STRTREE_ABSTRACTNODE_H
16#define GEOS_INDEX_STRTREE_ABSTRACTNODE_H
17
18#include <geos/export.h>
19#include <geos/index/strtree/Boundable.h> // for inheritance
20
21#include <vector>
22
23#ifdef _MSC_VER
24#pragma warning(push)
25#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
26#endif
27
28namespace geos {
29namespace index { // geos::index
30namespace strtree { // geos::index::strtree
31
42class GEOS_DLL AbstractNode: public Boundable {
43private:
44 std::vector<Boundable*> childBoundables;
45 int level;
46public:
47 AbstractNode(int newLevel, int capacity=10);
48 virtual ~AbstractNode();
49
50 // TODO: change signature to return by ref,
51 // document ownership of the return
52 inline std::vector<Boundable*>* getChildBoundables() {
53 return &childBoundables;
54 }
55
56 // TODO: change signature to return by ref,
57 // document ownership of the return
58 inline const std::vector<Boundable*>* getChildBoundables() const {
59 return &childBoundables;
60 }
61
74 const void* getBounds() const;
75
76 int getLevel();
77
78 void addChildBoundable(Boundable *childBoundable);
79
80protected:
81
82 virtual void* computeBounds() const=0;
83
84 mutable void* bounds;
85};
86
87
88} // namespace geos::index::strtree
89} // namespace geos::index
90} // namespace geos
91
92#ifdef _MSC_VER
93#pragma warning(pop)
94#endif
95
96#endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
const void * getBounds() const
A spatial object in an AbstractSTRtree.
Definition Boundable.h:25
Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) tree, a query-only R-tree.
Definition SIRtreePointInRing.h:32
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25