GEOS 3.15.0dev
PathString.h
1/**********************************************************************
2*
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2025 ISciences, LLC
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#pragma once
16
17#include <geos/export.h>
18
19#include <cstddef>
20#include <memory>
21#include <vector>
22
23namespace geos::geom {
24 class CoordinateSequence;
25}
26
27namespace geos::noding {
28
31class GEOS_DLL PathString {
32public:
33 explicit PathString(const void* p_context = nullptr) : context(p_context) {}
34
35 virtual ~PathString() = default;
36
37 virtual std::size_t getSize() const = 0;
38
39 virtual double getLength() const = 0;
40
46 const void*
47 getData() const
48 {
49 return context;
50 }
51
57 void
58 setData(const void* data)
59 {
60 context = data;
61 }
62
66 virtual const std::shared_ptr<const geom::CoordinateSequence>& getCoordinates() const = 0;
67
68 std::vector<PathString*>
69 static toRawPointerVector(const std::vector<std::unique_ptr<PathString>> & segStrings);
70
71private:
72
73 const void* context;
74};
75
76}
Definition PathString.h:31
void setData(const void *data)
Sets the user-defined data for this segment string.
Definition PathString.h:58
virtual const std::shared_ptr< const geom::CoordinateSequence > & getCoordinates() const =0
Return a pointer to the CoordinateSequence associated with this PathString.
const void * getData() const
Gets the user-defined data for this segment string.
Definition PathString.h:47
Definition Angle.h:26
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition CoverageCleaner.h:42