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