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
|
|
|
|
|
|
|
(void)THIS; |
23
|
2
|
50
|
|
|
|
|
Object me{ST(0)}; |
|
|
50
|
|
|
|
|
|
24
|
1
|
|
|
|
|
|
auto payload = me.payload(&payload_marker_IntersectionFinderAdder); |
25
|
1
|
|
|
|
|
|
auto* real_payload = static_cast(payload.ptr); |
26
|
1
|
|
|
|
|
|
auto* v = &real_payload->coords; |
27
|
|
|
|
|
|
|
|
28
|
2
|
50
|
|
|
|
|
auto result = xs::Array::create(v->size()); |
|
|
50
|
|
|
|
|
|
29
|
2
|
100
|
|
|
|
|
for(auto& c: *v) { |
30
|
1
|
50
|
|
|
|
|
result.push(xs::out(new Coordinate(c))); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
1
|
50
|
|
|
|
|
RETVAL = result; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
BOOT { |
38
|
46
|
|
|
|
|
|
payload_marker_IntersectionFinderAdder.svt_free = payload_marker_IntersectionFinderAdder_free; |
39
|
46
|
50
|
|
|
|
|
Stash(__PACKAGE__).inherit("Geo::Geos::Noding::SegmentIntersector"); |
|
|
50
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|