xsi/noding/IntersectionFinderAdder.xsi

filter: Statementstmt 95.4% 21 / 22 Branchbran 46.6% 28 / 60 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 59.7% 49 / 82 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« Geos.xs ↑ Summary xsi/LinearRing.xsi »
1 MODULE = Geo::Geos PACKAGE = Geo::Geos::Noding::IntersectionFinderAdder
2 PROTOTYPES: DISABLE
3  
4 Sv new(SV*,SV* liObj, Array coords) {
5 1 ▶ LineIntersector& li = xs::in<LineIntersector&>(liObj);
Branch: 1 branch
BranchTrueFalseTotal
LineIntersector& li = xs::in<LineIntersector&>(liObj); 1 0 1
6 1 ▶ auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}};
Branch: 3 branches
BranchTrueFalseTotal
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; 1 0 1
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; 1 0 1
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; 0 0 0
7  
8 1 auto* v = &payload->coords;
9 1 ▶ v->reserve(coords.size());
Branch: 2 branches
BranchTrueFalseTotal
v->reserve(coords.size()); 1 0 1
v->reserve(coords.size()); 1 0 1
10 2 ▶ for(auto it: coords) {
Branch: 4 branches
BranchTrueFalseTotal
for(auto it: coords) { 1 0 1
for(auto it: coords) { 1 0 1
for(auto it: coords) { 1 0 1
for(auto it: coords) { 1 1 2
11 1 ▶ Coordinate& c = xs::in<Coordinate&>(it);
Branch: 1 branch
BranchTrueFalseTotal
Coordinate& c = xs::in<Coordinate&>(it); 1 0 1
12 1 ▶ v->emplace_back(c);
Branch: 1 branch
BranchTrueFalseTotal
v->emplace_back(c); 1 0 1
13 1 }
14  
15 1 ▶ Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v));
Branch: 4 branches
BranchTrueFalseTotal
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); 1 0 1
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); 1 0 1
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); 1 0 1
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); 0 0 0
16 1 ▶ wrapped.payload_attach(payload, &payload_marker_IntersectionFinderAdder);
Branch: 1 branch
BranchTrueFalseTotal
wrapped.payload_attach(payload, &payload_marker_IntersectionFinderAdder); 1 0 1
17  
18 1 ▶ RETVAL = wrapped.ref();
Branch: 2 branches
BranchTrueFalseTotal
RETVAL = wrapped.ref(); 1 0 1
RETVAL = wrapped.ref(); 1 0 1
19 }
20  
21 xs::Array IntersectionFinderAdder::getInteriorIntersections() {
22 (void)THIS;
23 1 ▶ Object me{ST(0)};
Branch: 1 branch
BranchTrueFalseTotal
Object me{ST(0)}; 1 0 1
24 1 auto payload = me.payload(&payload_marker_IntersectionFinderAdder);
25 1 auto* real_payload = static_cast<IntersectionFinderAdder_payload*>(payload.ptr);
26 1 auto* v = &real_payload->coords;
27  
28 1 ▶ auto result = xs::Array::create(v->size());
Branch: 1 branch
BranchTrueFalseTotal
auto result = xs::Array::create(v->size()); 1 0 1
29 2 ▶ for(auto& c: *v) {
Branch: 1 branch
BranchTrueFalseTotal
for(auto& c: *v) { 1 1 2
30 1 ▶ result.push(xs::out<Coordinate*>(new Coordinate(c)));
Branch: 4 branches
BranchTrueFalseTotal
result.push(xs::out<Coordinate*>(new Coordinate(c))); 1 0 1
result.push(xs::out<Coordinate*>(new Coordinate(c))); 1 0 1
result.push(xs::out<Coordinate*>(new Coordinate(c))); 1 0 1
result.push(xs::out<Coordinate*>(new Coordinate(c))); 0 0 0
31 }
32 1 ▶ RETVAL = result;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = result; 1 0 1
33 }
34  
35 0 ▶int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }
Branch: 1 branch
BranchTrueFalseTotal
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } 0 0 0
36  
37 BOOT {
38 46 payload_marker_IntersectionFinderAdder.svt_free = payload_marker_IntersectionFinderAdder_free;
39 46 ▶ Stash(__PACKAGE__).inherit("Geo::Geos::Noding::SegmentIntersector");
Branch: 2 branches
BranchTrueFalseTotal
Stash(__PACKAGE__).inherit("Geo::Geos::Noding::SegmentIntersector"); 46 0 46
Stash(__PACKAGE__).inherit("Geo::Geos::Noding::SegmentIntersector"); 46 0 46
40 }
41  
42  
« Geos.xs ↑ Summary xsi/LinearRing.xsi »