GEOS 3.6.2
GeometryList.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 * Last port: ORIGINAL WORK
16 *
17 **********************************************************************/
18
19#ifndef GEOS_GEOM_GEOMETRYLIST_H
20#define GEOS_GEOM_GEOMETRYLIST_H
21
22#include <geos/export.h>
23#include <geos/geom/Geometry.h> // for auto_ptr
24
25#include <memory> // for auto_ptr
26#include <vector>
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31#endif
32
33namespace geos {
34namespace geom { // geos.geom
35
36
40class GEOS_DLL GeometryList {
41
42public:
43
45 friend class std::auto_ptr<GeometryList>;
46
47 typedef std::vector<Geometry*>::size_type size_type;
48
51 typedef std::auto_ptr<GeometryList> AutoPtr;
52
55
58
60 size_type size() const;
61
63 Geometry* operator[] (size_type);
64
66 const Geometry* operator[] (size_type) const;
67
68private:
69
70 std::vector<Geometry*> geoms;
71
72 GeometryList();
73 ~GeometryList();
74};
75
76} // namespace geos.geom
77} // namespace geos
78
79#ifdef _MSC_VER
80#pragma warning(pop)
81#endif
82
83#endif // GEOS_GEOM_GEOMETRYLIST_H
void add(Geometry::AutoPtr geom)
Add a geometry to the list (takes ownership).
std::auto_ptr< GeometryList > AutoPtr
Definition GeometryList.h:51
static GeometryList::AutoPtr create()
Create an empty GeometryList.
size_type size() const
Return number of geometries in this list.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
std::auto_ptr< Geometry > AutoPtr
An auto_ptr of Geometry.
Definition Geometry.h:180
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25