00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_GEOM_GEOMETRYLIST_H
00020 #define GEOS_GEOM_GEOMETRYLIST_H
00021
00022 #include <geos/export.h>
00023 #include <geos/geom/Geometry.h>
00024
00025 #include <memory>
00026 #include <vector>
00027
00028 #ifdef _MSC_VER
00029 #pragma warning(push)
00030 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00031 #endif
00032
00033 namespace geos {
00034 namespace geom {
00035
00036
00040 class GEOS_DLL GeometryList {
00041
00042 public:
00043
00045 friend class std::auto_ptr<GeometryList>;
00046
00047 typedef std::vector<Geometry*>::size_type size_type;
00048
00051 typedef std::auto_ptr<GeometryList> AutoPtr;
00052
00054 static GeometryList::AutoPtr create();
00055
00057 void add(Geometry::AutoPtr geom);
00058
00060 size_type size() const;
00061
00063 Geometry* operator[] (size_type);
00064
00066 const Geometry* operator[] (size_type) const;
00067
00068 private:
00069
00070 std::vector<Geometry*> geoms;
00071
00072 GeometryList();
00073 ~GeometryList();
00074 };
00075
00076 }
00077 }
00078
00079 #ifdef _MSC_VER
00080 #pragma warning(pop)
00081 #endif
00082
00083 #endif // GEOS_GEOM_GEOMETRYLIST_H