line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = Geo::Geos PACKAGE = Geo::Geos::Noding::IntersectionFinderAdder |
2
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Sv new(SV*,SV* liObj, Array coords) { |
5
|
1
|
50
|
|
|
|
|
LineIntersector& li = xs::in(liObj); |
6
|
1
|
50
|
|
|
|
|
auto* payload = new IntersectionFinderAdder_payload{SvRV(liObj), {}}; |
|
|
50
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
|
|
|
auto* v = &payload->coords; |
9
|
1
|
50
|
|
|
|
|
v->reserve(coords.size()); |
|
|
50
|
|
|
|
|
|
10
|
2
|
50
|
|
|
|
|
for(auto it: coords) { |
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
11
|
1
|
50
|
|
|
|
|
Coordinate& c = xs::in(it); |
12
|
1
|
50
|
|
|
|
|
v->emplace_back(c); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
2
|
50
|
|
|
|
|
Object wrapped = xs::out<>(new IntersectionFinderAdder(li, *v)); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
16
|
1
|
50
|
|
|
|
|
wrapped.payload_attach(payload, &payload_marker_IntersectionFinderAdder); |
17
|
|
|
|
|
|
|
|
18
|
1
|
50
|
|
|
|
|
RETVAL = wrapped.ref(); |
|
|
50
|
|
|
|
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
xs::Array IntersectionFinderAdder::getInteriorIntersections() { |
22
|
2
|
50
|
|
|
|
|
Object me{ST(0)}; |
|
|
50
|
|
|
|
|
|
23
|
1
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_IntersectionFinderAdder); |
24
|
1
|
|
|
|
|
|
auto* real_payload = static_cast(payload.ptr); |
25
|
1
|
|
|
|
|
|
auto* v = &real_payload->coords; |
26
|
|
|
|
|
|
|
|
27
|
2
|
50
|
|
|
|
|
auto result = xs::Array::create(v->size()); |
|
|
50
|
|
|
|
|
|
28
|
2
|
100
|
|
|
|
|
for(auto& c: *v) { |
29
|
1
|
50
|
|
|
|
|
result.push(xs::out(new Coordinate(c))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
1
|
50
|
|
|
|
|
RETVAL = result; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
BOOT { |
37
|
46
|
|
|
|
|
|
payload_marker_IntersectionFinderAdder.svt_free = payload_marker_IntersectionFinderAdder_free; |
38
|
46
|
50
|
|
|
|
|
Stash(__PACKAGE__).inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
|
50
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|