@@ -24,91 +24,93 @@ namespace geom {
24
24
class GEOS_DLL CompoundCurve : public Curve {
25
25
friend class GeometryFactory ;
26
26
27
-
28
27
public:
28
+ using Curve::apply_ro;
29
+ using Curve::apply_rw;
29
30
30
- CompoundCurve (const CompoundCurve&);
31
-
32
- CompoundCurve& operator =(const CompoundCurve&);
33
-
34
- std::unique_ptr<CoordinateSequence> getCoordinates () const override ;
35
-
36
- const CoordinateXY* getCoordinate () const override ;
31
+ void apply_ro (CoordinateFilter* filter) const override ;
37
32
38
- uint8_t getCoordinateDimension ( ) const override ;
33
+ void apply_ro (CoordinateSequenceFilter& filter ) const override ;
39
34
40
- bool hasZ () const override ;
35
+ void apply_rw (CoordinateSequenceFilter& filter) override ;
41
36
42
- bool hasM () const override ;
37
+ void apply_rw ( const CoordinateFilter* filter) override ;
43
38
44
- bool isEmpty ( ) const override ;
39
+ int compareToSameClass ( const Geometry* geom ) const override ;
45
40
46
- bool isClosed () const override ;
41
+ std::unique_ptr<CompoundCurve> clone () const ;
47
42
48
- std:: size_t getNumCurves () const ;
43
+ CompoundCurve* cloneImpl () const override ;
49
44
50
- const SimpleCurve* getCurveN (std::size_t ) const ;
45
+ bool equalsExact (const Geometry* other, double tolerance = 0 )
46
+ const override ;
51
47
52
- std:: size_t getNumPoints ( ) const override ;
48
+ bool equalsIdentical ( const Geometry* other ) const override ;
53
49
54
50
std::unique_ptr<Geometry> getBoundary () const override ;
55
51
56
- std::string getGeometryType () const override ;
52
+ const CoordinateXY* getCoordinate () const override ;
57
53
58
- GeometryTypeId getGeometryTypeId () const override ;
54
+ std::unique_ptr<CoordinateSequence> getCoordinates () const override ;
59
55
60
- bool equalsExact (const Geometry* other, double tolerance = 0 )
61
- const override ;
56
+ uint8_t getCoordinateDimension () const override ;
62
57
63
- bool equalsIdentical (const Geometry* other) const override ;
58
+ // / Returns the nth section of the CompoundCurve
59
+ const SimpleCurve* getCurveN (std::size_t ) const ;
64
60
65
61
const Envelope* getEnvelopeInternal () const override
66
62
{
67
63
return &envelope;
68
64
}
69
65
70
- std::unique_ptr<CompoundCurve> clone () const ;
66
+ std::string getGeometryType () const override ;
71
67
72
- CompoundCurve* cloneImpl () const override ;
68
+ GeometryTypeId getGeometryTypeId () const override ;
73
69
74
- std::unique_ptr<CompoundCurve> reverse () const ;
70
+ double getLength () const override ;
75
71
76
- CompoundCurve* reverseImpl () const override ;
72
+ // / Returns the number of sections in the CompoundCurve
73
+ std::size_t getNumCurves () const ;
77
74
78
- double getLength () const override ;
75
+ std:: size_t getNumPoints () const override ;
79
76
80
- using Curve::apply_ro;
81
- using Curve::apply_rw;
77
+ bool hasCurvedComponents () const override ;
82
78
83
- void apply_rw ( const CoordinateFilter* filter) override ;
79
+ bool hasM () const override ;
84
80
85
- void apply_ro (CoordinateFilter* filter ) const override ;
81
+ bool hasZ ( ) const override ;
86
82
87
- void apply_rw (CoordinateSequenceFilter& filter) override ;
83
+ bool isClosed () const override ;
88
84
89
- void apply_ro (CoordinateSequenceFilter& filter ) const override ;
85
+ bool isEmpty ( ) const override ;
90
86
91
87
void normalize () override ;
92
88
93
- int compareToSameClass (const Geometry* geom) const override ;
94
-
95
- bool hasCurvedComponents () const override ;
89
+ std::unique_ptr<CompoundCurve> reverse () const ;
96
90
97
91
protected:
92
+ // / Construct a CompoundCurve, taking ownership of the
93
+ // / provided CoordinateSequence
98
94
CompoundCurve (std::vector<std::unique_ptr<SimpleCurve>>&&,
99
95
const GeometryFactory&);
100
96
101
- int getSortIndex () const override
102
- {
103
- return SORTINDEX_COMPOUNDCURVE;
104
- }
97
+ CompoundCurve (const CompoundCurve&);
98
+
99
+ CompoundCurve& operator =(const CompoundCurve&);
100
+
101
+ Envelope computeEnvelopeInternal () const ;
105
102
106
103
void geometryChangedAction () override
107
104
{
108
105
envelope = computeEnvelopeInternal ();
109
106
}
110
107
111
- Envelope computeEnvelopeInternal () const ;
108
+ int getSortIndex () const override
109
+ {
110
+ return SORTINDEX_COMPOUNDCURVE;
111
+ }
112
+
113
+ CompoundCurve* reverseImpl () const override ;
112
114
113
115
private:
114
116
std::vector<std::unique_ptr<SimpleCurve>> curves;
0 commit comments