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