GEOS  3.9.1dev
PreparedGeometryFactory.h
Go to the documentation of this file.
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  *
16  * Last port: geom/prep/PreparedGeometryFactory.java rev. 1.4 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
21 #define GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
22 
23 #include <geos/export.h>
25 
26 #include <memory>
27 
28 namespace geos {
29 namespace geom {
30 namespace prep {
31 class PreparedGeometry;
32 }
33 }
34 }
35 
36 
37 namespace geos {
38 namespace geom { // geos::geom
39 namespace prep { // geos::geom::prep
40 
41 
55 public:
56 
63  static std::unique_ptr<PreparedGeometry>
64  prepare(const geom::Geometry* geom)
65  {
67  return pf.create(geom);
68  }
69 
75  static void
77  {
78  delete geom;
79  }
80 
87  std::unique_ptr<PreparedGeometry> create(const geom::Geometry* geom) const;
88 
89 };
90 
91 } // namespace geos::geom::prep
92 } // namespace geos::geom
93 } // namespace geos
94 
95 #endif // GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
#define GEOS_DLL
Definition: export.h:28
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
static void destroy(const PreparedGeometry *geom)
std::unique_ptr< PreparedGeometry > create(const geom::Geometry *geom) const
An interface for classes which prepare Geometrys in order to optimize the performance of repeated cal...
Basic namespace for all GEOS functionalities.
A factory for creating PreparedGeometrys.
static std::unique_ptr< PreparedGeometry > prepare(const geom::Geometry *geom)