GEOS: GeometryList.h Source File

GEOS 3.3.8

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

- File List

GeometryList.h
1 /**********************************************************************
2 * $Id: GeometryList.h 3255 2011-03-01 17:56:10Z 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 * Last port: ORIGINAL WORK
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_GEOM_GEOMETRYLIST_H
21 #define GEOS_GEOM_GEOMETRYLIST_H
22
23 #include <geos/export.h>
24 #include <geos/geom/Geometry.h> // for auto_ptr
25
26 #include <memory> // for auto_ptr
27 #include <vector>
28
29 #ifdef _MSC_VER
30 #pragma warning(push)
31 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
32 #endif
33
34 namespace geos {
35 namespace geom { // geos.geom
36
37
41 class GEOS_DLL GeometryList {
42
43 public:
44
46 friend class std::auto_ptr<GeometryList>;
47
48 typedef std::vector<Geometry*>::size_type size_type;
49
52 typedef std::auto_ptr<GeometryList> AutoPtr;
53
55 static GeometryList::AutoPtr create();
56
58 void add(Geometry::AutoPtr geom);
59
61 size_type size() const;
62
64 Geometry* operator[] (size_type);
65
67 const Geometry* operator[] (size_type) const;
68
69 private:
70
71 std::vector<Geometry*> geoms;
72
73 GeometryList();
74 ~GeometryList();
75 };
76
77 } // namespace geos.geom
78 } // namespace geos
79
80 #ifdef _MSC_VER
81 #pragma warning(pop)
82 #endif
83
84 #endif // GEOS_GEOM_GEOMETRYLIST_H
85
86 /**********************************************************************
87 * $Log$
88 * Revision 1.2 2006/04/11 09:53:44 strk
89 * Added missing duplicated include sentinel
90 *
91 * Revision 1.1 2006/04/11 09:41:26 strk
92 * Initial implementation of a GeometryList class, to be used to manage
93 * lists of Geometry pointers.
94 *
95 **********************************************************************/
96