GeometryList.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2006 Refractions Research Inc.
00007  *
00008  * This is free software; you can redistribute and/or modify it under
00009  * the terms of the GNU Lesser General Public Licence as published
00010  * by the Free Software Foundation. 
00011  * See the COPYING file for more information.
00012  *
00013  **********************************************************************
00014  *
00015  * Last port: ORIGINAL WORK
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> // for auto_ptr
00024 
00025 #include <memory> // for auto_ptr
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 { // geos.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 } // namespace geos.geom
00077 } // namespace geos
00078 
00079 #ifdef _MSC_VER
00080 #pragma warning(pop)
00081 #endif
00082 
00083 #endif // GEOS_GEOM_GEOMETRYLIST_H

Generated on 10 Sep 2013 for GEOS by  doxygen 1.4.7