Coverage Report

Created: 2025-10-10 06:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/geos/include/geos/geom/util/GeometryEditorOperation.h
Line
Count
Source
1
/**********************************************************************
2
 *
3
 * GEOS - Geometry Engine Open Source
4
 * http://geos.osgeo.org
5
 *
6
 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7
 * Copyright (C) 2006 Refractions Research Inc.
8
 *
9
 * This is free software; you can redistribute and/or modify it under
10
 * the terms of the GNU Lesser General Public Licence as published
11
 * by the Free Software Foundation.
12
 * See the COPYING file for more information.
13
 *
14
 **********************************************************************/
15
16
#pragma once
17
18
#include <geos/export.h>
19
#include <memory>
20
21
// Forward declarations
22
namespace geos {
23
namespace geom {
24
class Geometry;
25
class GeometryFactory;
26
}
27
}
28
29
30
namespace geos {
31
namespace geom { // geos.geom
32
namespace util { // geos.geom.util
33
34
35
/**
36
 * A interface which specifies an edit operation for Geometries.
37
 */
38
class GEOS_DLL GeometryEditorOperation {
39
40
public:
41
    /**
42
     * Edits a Geometry by returning a new Geometry with a modification.
43
     * The returned Geometry might be the same as the Geometry passed in.
44
     *
45
     * @param geometry the Geometry to modify
46
     *
47
     * @param factory the factory with which to construct the modified
48
     *                Geometry (may be different to the factory of the
49
     *                input geometry)
50
     *
51
     * @return a new Geometry which is a modification of the input Geometry
52
     */
53
    virtual std::unique_ptr<Geometry> edit(const Geometry* geometry,
54
                                           const GeometryFactory* factory) = 0;
55
56
    virtual
57
0
    ~GeometryEditorOperation() {}
58
};
59
60
61
62
} // namespace geos.geom.util
63
} // namespace geos.geom
64
} // namespace geos
65