GEOS  3.9.1dev
MarkHalfEdge.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) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
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 #pragma once
17 
18 #include <geos/geom/Coordinate.h>
19 
20 #include <geos/export.h>
21 #include <string>
22 #include <cassert>
23 
24 // Forward declarations
25 namespace geos {
26 namespace geom {
27 class Coordinate;
28 }
29 }
30 
31 namespace geos {
32 namespace edgegraph { // geos.edgegraph
33 
34 class GEOS_DLL MarkHalfEdge : public HalfEdge {
35 
36 private:
37 
38  bool m_isMarked;
39 
40 public:
41 
47  MarkHalfEdge(const geom::Coordinate& p_orig) :
48  HalfEdge(p_orig),
49  m_isMarked(false)
50  {};
51 
58  static bool isMarked(HalfEdge* e);
59 
65  static void mark(HalfEdge* e);
66 
73  static void setMark(HalfEdge* e, bool isMarked);
74 
81  static void setMarkBoth(HalfEdge* e, bool isMarked);
82 
88  static void markBoth(HalfEdge* e);
89 
95  bool isMarked() const { return m_isMarked; }
96 
101  void mark() { m_isMarked = true; }
102 
108  void setMark(bool p_isMarked) { m_isMarked = p_isMarked; }
109 
110 };
111 
112 
113 } // namespace geos.edgegraph
114 } // namespace geos
115 
116 
117 
MarkHalfEdge(const geom::Coordinate &p_orig)
Definition: MarkHalfEdge.h:47
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic namespace for all GEOS functionalities.
void setMark(bool p_isMarked)
Definition: MarkHalfEdge.h:108