| 1 |
|
| MODULE = Geo::Geos PACKAGE = Geo::Geos::Noding::Noder |
| 2 |
|
| PROTOTYPES: DISABLE |
| 3 |
|
| |
| 4 |
|
| void Noder::computeNodes(Array segStrings) { |
| 5 |
5 |
| auto segments = Noder_payload::vector_t(); |
| 6 |
5 |
▶ | segments.reserve(segStrings.size()); |
Branch: 2 branches
| Branch | True | False | Total |
| segments.reserve(segStrings.size()); |
5 |
0 |
5 |
| segments.reserve(segStrings.size()); |
5 |
0 |
5 |
|
| 7 |
|
| |
| 8 |
11 |
▶ | for(auto it: segStrings) { |
Branch: 4 branches
| Branch | True | False | Total |
| for(auto it: segStrings) { |
5 |
0 |
5 |
| for(auto it: segStrings) { |
5 |
0 |
5 |
| for(auto it: segStrings) { |
6 |
0 |
6 |
| for(auto it: segStrings) { |
6 |
5 |
11 |
|
| 9 |
6 |
▶ | SegmentString& ss = xs::in<SegmentString&>(it); |
Branch: 1 branch
| Branch | True | False | Total |
| SegmentString& ss = xs::in<SegmentString&>(it); |
6 |
0 |
6 |
|
| 10 |
6 |
▶ | segments.push_back(&ss); |
Branch: 1 branch
| Branch | True | False | Total |
| segments.push_back(&ss); |
6 |
0 |
6 |
|
| 11 |
6 |
| } |
| 12 |
|
| |
| 13 |
5 |
▶ | auto payload = new Noder_payload(); |
Branch: 1 branch
| Branch | True | False | Total |
| auto payload = new Noder_payload(); |
5 |
0 |
5 |
|
| 14 |
5 |
▶ | payload->array_ref = xs::Ref::create(segStrings); |
Branch: 1 branch
| Branch | True | False | Total |
| payload->array_ref = xs::Ref::create(segStrings); |
5 |
0 |
5 |
|
| 15 |
5 |
| payload->segments = std::move(segments); |
| 16 |
|
| |
| 17 |
|
| |
| 18 |
5 |
▶ | Object self{ST(0)}; |
Branch: 1 branch
| Branch | True | False | Total |
| Object self{ST(0)}; |
5 |
0 |
5 |
|
| 19 |
5 |
▶ | self.payload_attach(payload, &payload_marker_Noder); |
Branch: 1 branch
| Branch | True | False | Total |
| self.payload_attach(payload, &payload_marker_Noder); |
5 |
0 |
5 |
|
| 20 |
|
| |
| 21 |
5 |
▶ | THIS->computeNodes(&payload->segments); |
Branch: 1 branch
| Branch | True | False | Total |
| THIS->computeNodes(&payload->segments); |
5 |
0 |
5 |
|
| 22 |
|
| } |
| 23 |
|
| |
| 24 |
|
| Sv Noder::getNodedSubstrings() { |
| 25 |
6 |
▶ | auto items = THIS->getNodedSubstrings(); |
Branch: 1 branch
| Branch | True | False | Total |
| auto items = THIS->getNodedSubstrings(); |
6 |
0 |
6 |
|
| 26 |
6 |
▶ | if (!items) XSRETURN_UNDEF; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!items) XSRETURN_UNDEF; |
0 |
6 |
6 |
|
| 27 |
|
| else { |
| 28 |
6 |
▶ | xs::Array result = xs::Array::create(items->size()); |
Branch: 1 branch
| Branch | True | False | Total |
| xs::Array result = xs::Array::create(items->size()); |
6 |
0 |
6 |
|
| 29 |
28 |
▶ | for(auto it: *items) { |
Branch: 1 branch
| Branch | True | False | Total |
| for(auto it: *items) { |
22 |
6 |
28 |
|
| 30 |
22 |
▶ | result.push(xs::out<SegmentString*>(it)); |
Branch: 2 branches
| Branch | True | False | Total |
| result.push(xs::out<SegmentString*>(it)); |
22 |
0 |
22 |
| result.push(xs::out<SegmentString*>(it)); |
22 |
0 |
22 |
|
| 31 |
|
| } |
| 32 |
6 |
▶ | delete items; |
Branch: 1 branch
| Branch | True | False | Total |
| delete items; |
6 |
0 |
6 |
|
| 33 |
6 |
▶ | RETVAL = xs::Ref::create(result); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = xs::Ref::create(result); |
6 |
0 |
6 |
|
| 34 |
6 |
| } |
| 35 |
|
| } |
| 36 |
|
| |
| 37 |
|
| BOOT { |
| 38 |
46 |
| payload_marker_Noder.svt_free = payload_marker_Noder_free; |
| 39 |
|
| } |