File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/CPP/geos.x/i/geos/operation/linemerge/LineMergeGraph.h
Criterion Covered Total %
statement 1 1 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 1 1 100.0


line stmt bran cond sub pod time code
1             /**********************************************************************
2             *
3             * GEOS - Geometry Engine Open Source
4             * http://geos.osgeo.org
5             *
6             * Copyright (C) 2011 Sandro Santilli
7             * Copyright (C) 2006 Refractions Research Inc.
8             * Copyright (C) 2001-2002 Vivid Solutions Inc.
9             *
10             * This is free software; you can redistribute and/or modify it under
11             * the terms of the GNU Lesser General Public Licence as published
12             * by the Free Software Foundation.
13             * See the COPYING file for more information.
14             *
15             **********************************************************************
16             *
17             * Last port: operation/linemerge/LineMergeGraph.java r378 (JTS-1.12)
18             *
19             **********************************************************************/
20              
21             #ifndef GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H
22             #define GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H
23              
24             #include
25             #include // for inheritance
26              
27             #include
28              
29             #ifdef _MSC_VER
30             #pragma warning(push)
31             #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
32             #endif
33              
34             // Forward declarations
35             namespace geos {
36             namespace geom {
37             class LineString;
38             class Coordinate;
39             }
40             namespace planargraph {
41             class Node;
42             class Edge;
43             class DirectedEdge;
44             }
45             }
46              
47              
48             namespace geos {
49             namespace operation { // geos::operation
50             namespace linemerge { // geos::operation::linemerge
51              
52             /** \brief
53             * A planar graph of edges that is analyzed to sew the edges together.
54             *
55             * The marked flag on planargraph::Edge
56             * and planargraph::Node indicates whether they have been
57             * logically deleted from the graph.
58             */
59 2           class GEOS_DLL LineMergeGraph: public planargraph::PlanarGraph {
60              
61             private:
62              
63             planargraph::Node* getNode(const geom::Coordinate &coordinate);
64              
65             std::vector newNodes;
66              
67             std::vector newEdges;
68              
69             std::vector newDirEdges;
70              
71             public:
72              
73             /** \brief
74             * Adds an Edge, DirectedEdges, and Nodes for the given
75             * LineString representation of an edge.
76             *
77             * Empty lines or lines with all coordinates equal are not added.
78             *
79             * @param lineString the linestring to add to the graph
80             */
81             void addEdge(const geom::LineString *lineString);
82              
83             ~LineMergeGraph() override;
84             };
85             } // namespace geos::operation::linemerge
86             } // namespace geos::operation
87             } // namespace geos
88              
89             #ifdef _MSC_VER
90             #pragma warning(pop)
91             #endif
92              
93             #endif // GEOS_OP_LINEMERGE_LINEMERGEGRAPH_H