GEOS: AbstractNode.h Source File

GEOS 3.3.8

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

- File List

AbstractNode.h
1 /**********************************************************************
2 * $Id: AbstractNode.h 2958 2010-03-29 11:29:40Z mloskot $
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_INDEX_STRTREE_ABSTRACTNODE_H
17 #define GEOS_INDEX_STRTREE_ABSTRACTNODE_H
18
19 #include <geos/export.h>
20 #include <geos/index/strtree/Boundable.h> // for inheritance
21
22 #include <vector>
23
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
27 #endif
28
29 namespace geos {
30 namespace index { // geos::index
31 namespace strtree { // geos::index::strtree
32
43 class GEOS_DLL AbstractNode: public Boundable {
44 private:
45 std::vector<Boundable*> childBoundables;
46 int level;
47 public:
48 AbstractNode(int newLevel, int capacity=10);
49 virtual ~AbstractNode();
50
51 // TODO: change signature to return by ref,
52 // document ownership of the return
53 inline std::vector<Boundable*>* getChildBoundables() {
54 return &childBoundables;
55 }
56
57 // TODO: change signature to return by ref,
58 // document ownership of the return
59 inline const std::vector<Boundable*>* getChildBoundables() const {
60 return &childBoundables;
61 }
62
75 const void* getBounds() const;
76
77 int getLevel();
78
79 void addChildBoundable(Boundable *childBoundable);
80
81 protected:
82
83 virtual void* computeBounds() const=0;
84
85 mutable void* bounds;
86 };
87
88
89 } // namespace geos::index::strtree
90 } // namespace geos::index
91 } // namespace geos
92
93 #ifdef _MSC_VER
94 #pragma warning(pop)
95 #endif
96
97 #endif // GEOS_INDEX_STRTREE_ABSTRACTNODE_H
98
99 /**********************************************************************
100 * $Log$
101 * Revision 1.1 2006/03/21 10:47:34 strk
102 * indexStrtree.h split
103 *
104 **********************************************************************/
105