File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/CPP/geos.x/i/geos/noding/SinglePassNoder.h
Criterion Covered Total %
statement 1 4 25.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 1 4 25.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) 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             #ifndef GEOS_NODING_SINGLEPASSNODER_H
16             #define GEOS_NODING_SINGLEPASSNODER_H
17              
18             #include
19              
20             #include
21              
22             #include
23              
24             #include
25              
26             // Forward declarations
27             namespace geos {
28             namespace noding {
29             class SegmentString;
30             class SegmentIntersector;
31             }
32             }
33              
34             namespace geos {
35             namespace noding { // geos.noding
36              
37              
38             /**
39             * Base class for {@link Noder}s which make a single
40             * pass to find intersections.
41             * This allows using a custom {@link SegmentIntersector}
42             * (which for instance may simply identify intersections, rather than
43             * insert them).
44             *
45             * Last port: noding/SinglePassNoder.java rev. 1.3 (JTS-1.7)
46             *
47             * TODO: Noder inheritance (that's just an interface!)
48             *
49             */
50             class GEOS_DLL SinglePassNoder : public Noder { // implements Noder
51              
52             protected:
53              
54             /// Externally owned
55             SegmentIntersector* segInt;
56              
57             public:
58              
59 2           SinglePassNoder(SegmentIntersector* nSegInt=nullptr): segInt(nSegInt) {}
60              
61             ~SinglePassNoder() override {}
62              
63             /**
64             * Sets the SegmentIntersector to use with this noder.
65             * A SegmentIntersector will normally add intersection nodes
66             * to the input segment strings, but it may not - it may
67             * simply record the presence of intersections.
68             * However, some Noders may require that intersections be added.
69             *
70             * @param newSegInt
71             */
72 0           virtual void setSegmentIntersector(SegmentIntersector* newSegInt) {
73 0           segInt = newSegInt;
74 0           }
75              
76             /**
77             * Computes the noding for a collection of {@link SegmentString}s.
78             *
79             * @param segStrings a collection of {@link SegmentString}s to node
80             */
81             void computeNodes(std::vector* segStrings) override =0;
82              
83             /**
84             * Returns a {@link Collection} of fully noded {@link SegmentStrings}.
85             * The SegmentStrings have the same context as their parent.
86             *
87             * @return a Collection of SegmentStrings
88             */
89             std::vector* getNodedSubstrings() const override =0;
90              
91             };
92              
93             } // namespace geos.noding
94             } // namespace geos
95              
96             #endif // GEOS_NODING_SINGLEPASSNODER_H