GEOS: GeometryList.h Source File

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

- File List

# GeometryList.h

    00001 /**********************************************************************
    00002  * $Id: GeometryList.h 2556 2009-06-06 22:22:28Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************
    00015  *
    00016  * Last port: ORIGINAL WORK
    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> // for auto_ptr
    00025
    00026 #include <memory> // for auto_ptr
    00027 #include <vector>
    00028
    00029 namespace geos {
    00030 namespace geom { // geos.geom
    00031
    00032
    00036 class GEOS_DLL GeometryList {
    00037
    00038 public:
    00039
    00041         friend class std::auto_ptr<GeometryList>;
    00042
    00043         typedef std::vector<Geometry*>::size_type size_type;
    00044
    00047         typedef std::auto_ptr<GeometryList> AutoPtr;
    00048
    00050         static GeometryList::AutoPtr create();
    00051
    00053         void add(Geometry::AutoPtr geom);
    00054
    00056         size_type size() const;
    00057
    00059         Geometry* operator[] (size_type);
    00060
    00062         const Geometry* operator[] (size_type) const;
    00063
    00064 private:
    00065
    00066         std::vector<Geometry*> geoms;
    00067
    00068         GeometryList();
    00069
    00070         ~GeometryList();
    00071
    00072 };
    00073
    00074 } // namespace geos.geom
    00075 } // namespace geos
    00076
    00077 #endif // GEOS_GEOM_GEOMETRYLIST_H
    00078
    00079 /**********************************************************************
    00080  * $Log$
    00081  * Revision 1.2  2006/04/11 09:53:44  strk
    00082  * Added missing duplicated include sentinel
    00083  *
    00084  * Revision 1.1  2006/04/11 09:41:26  strk
    00085  * Initial implementation of a GeometryList class, to be used to manage
    00086  * lists of Geometry pointers.
    00087  *
    00088  **********************************************************************/
    00089