GEOS  3.14.0dev
PreparedGeometryFactory.h
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 #pragma once
21 
22 #include <geos/export.h>
23 #include <geos/geom/prep/PreparedGeometry.h>
24 
25 #include <memory>
26 
27 namespace geos {
28 namespace geom {
29 namespace prep {
30 class PreparedGeometry;
31 }
32 }
33 }
34 
35 
36 namespace geos {
37 namespace geom { // geos::geom
38 namespace prep { // geos::geom::prep
39 
40 
53 class GEOS_DLL PreparedGeometryFactory {
54 public:
55 
62  static std::unique_ptr<PreparedGeometry>
63  prepare(const geom::Geometry* geom)
64  {
66  return pf.create(geom);
67  }
68 
74  static void
76  {
77  delete geom;
78  }
79 
86  std::unique_ptr<PreparedGeometry> create(const geom::Geometry* geom) const;
87 
88 };
89 
90 } // namespace geos::geom::prep
91 } // namespace geos::geom
92 } // namespace geos
93 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
A factory for creating PreparedGeometrys.
Definition: PreparedGeometryFactory.h:53
std::unique_ptr< PreparedGeometry > create(const geom::Geometry *geom) const
static void destroy(const PreparedGeometry *geom)
Definition: PreparedGeometryFactory.h:75
static std::unique_ptr< PreparedGeometry > prepare(const geom::Geometry *geom)
Definition: PreparedGeometryFactory.h:63
An interface for classes which prepare Geometrys in order to optimize the performance of repeated cal...
Definition: PreparedGeometry.h:58
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25