| 1 |
|
| MODULE = Geo::Geos PACKAGE = Geo::Geos::Algorithm::HCoordinate |
| 2 |
|
| PROTOTYPES: DISABLE |
| 3 |
|
| |
| 4 |
|
| HCoordinate* new(SV*, SV* arg1, SV* arg2 = NULL, SV* arg3 = NULL, SV* arg4 = NULL) { |
| 5 |
5 |
| if (!arg2) { |
| 6 |
5 |
▶ | auto c = xs::in<Coordinate*>(arg1); |
Branch: 1 branch
| Branch | True | False | Total |
| auto c = xs::in<Coordinate*>(arg1); |
1 |
4 |
5 |
|
| 7 |
1 |
▶ | RETVAL = new HCoordinate(*c); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new HCoordinate(*c); |
1 |
0 |
1 |
|
| 8 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 9 |
|
| else if(!arg3) { |
| 10 |
4 |
▶ | Object obj1 {arg1}, obj2{arg2}; |
Branch: 1 branch
| Branch | True | False | Total |
| Object obj1 {arg1}, obj2{arg2}; |
2 |
2 |
4 |
|
| 11 |
2 |
▶ | if(!obj1) throw("wrong argument"); |
Branch: 2 branches
| Branch | True | False | Total |
| if(!obj1) throw("wrong argument"); |
2 |
0 |
2 |
| if(!obj1) throw("wrong argument"); |
2 |
0 |
2 |
|
| 12 |
2 |
▶ | if(!obj2) throw("wrong argument"); |
Branch: 1 branch
| Branch | True | False | Total |
| if(!obj2) throw("wrong argument"); |
0 |
2 |
2 |
|
| 13 |
2 |
▶ | if (obj1.stash().name() == "Geo::Geos::Algorithm::HCoordinate") { |
Branch: 1 branch
| Branch | True | False | Total |
| if (obj1.stash().name() == "Geo::Geos::Algorithm::HCoordinate") { |
0 |
2 |
2 |
|
| 14 |
2 |
▶ | auto& c1 = xs::in<HCoordinate&>(obj1); |
Branch: 4 branches
| Branch | True | False | Total |
| auto& c1 = xs::in<HCoordinate&>(obj1); |
2 |
0 |
2 |
| auto& c1 = xs::in<HCoordinate&>(obj1); |
2 |
0 |
2 |
| auto& c1 = xs::in<HCoordinate&>(obj1); |
2 |
0 |
2 |
| auto& c1 = xs::in<HCoordinate&>(obj1); |
1 |
1 |
2 |
|
| 15 |
1 |
▶ | auto& c2 = xs::in<HCoordinate&>(obj1); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& c2 = xs::in<HCoordinate&>(obj1); |
1 |
0 |
1 |
|
| 16 |
1 |
▶ | RETVAL = new HCoordinate(c1, c2); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new HCoordinate(c1, c2); |
1 |
0 |
1 |
|
| 17 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 18 |
|
| else { |
| 19 |
|
| auto& c1 = xs::in<Coordinate&>(obj1); |
| 20 |
1 |
▶ | auto& c2 = xs::in<Coordinate&>(obj1); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& c2 = xs::in<Coordinate&>(obj1); |
1 |
0 |
1 |
|
| 21 |
1 |
▶ | RETVAL = new HCoordinate(c1, c2); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new HCoordinate(c1, c2); |
1 |
0 |
1 |
|
| 22 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 23 |
|
| } |
| 24 |
2 |
| else if(!arg4) { |
| 25 |
2 |
▶ | if(!arg1) throw("undef not allowed"); |
Branch: 1 branch
| Branch | True | False | Total |
| if(!arg1) throw("undef not allowed"); |
1 |
1 |
2 |
|
| 26 |
1 |
▶ | if(!arg2) throw("undef not allowed"); |
Branch: 1 branch
| Branch | True | False | Total |
| if(!arg2) throw("undef not allowed"); |
0 |
1 |
1 |
|
| 27 |
1 |
▶ | if(!arg3) throw("undef not allowed"); |
Branch: 1 branch
| Branch | True | False | Total |
| if(!arg3) throw("undef not allowed"); |
0 |
1 |
1 |
|
| 28 |
1 |
▶ | RETVAL = new HCoordinate(Simple(arg1), Simple(arg2), Simple(arg3)); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new HCoordinate(Simple(arg1), Simple(arg2), Simple(arg3)); |
0 |
1 |
1 |
|
| 29 |
1 |
▶ | } |
Branch: 9 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 30 |
|
| else { |
| 31 |
|
| auto& c1 = xs::in<Coordinate&>(arg1); |
| 32 |
1 |
▶ | auto& c2 = xs::in<Coordinate&>(arg2); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& c2 = xs::in<Coordinate&>(arg2); |
1 |
0 |
1 |
|
| 33 |
1 |
▶ | auto& c3 = xs::in<Coordinate&>(arg3); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& c3 = xs::in<Coordinate&>(arg3); |
1 |
0 |
1 |
|
| 34 |
1 |
▶ | auto& c4 = xs::in<Coordinate&>(arg4); |
Branch: 1 branch
| Branch | True | False | Total |
| auto& c4 = xs::in<Coordinate&>(arg4); |
1 |
0 |
1 |
|
| 35 |
1 |
▶ | RETVAL = new HCoordinate(c1, c2, c3, c4); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new HCoordinate(c1, c2, c3, c4); |
1 |
0 |
1 |
|
| 36 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 37 |
|
| } |
| 38 |
|
| |
| 39 |
|
| double HCoordinate::x(SV* newval = NULL) : ALIAS(y=1,w=2) { |
| 40 |
|
| double* val; |
| 41 |
8 |
| switch (ix) { |
| 42 |
3 |
| case 0: val = &THIS->x; break; |
| 43 |
3 |
| case 1: val = &THIS->y; break; |
| 44 |
2 |
| default: val = &THIS->w; break; |
| 45 |
|
| } |
| 46 |
8 |
▶ | if (newval) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (newval) { |
0 |
8 |
8 |
|
| 47 |
0 |
| *val = SvNV(newval); |
| 48 |
|
| } |
| 49 |
8 |
▶ | RETVAL = *val; |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = *val; |
0 |
8 |
8 |
|
| 50 |
|
| } |
| 51 |
|
| |
| 52 |
|
| Coordinate* HCoordinate::getCoordinate() { |
| 53 |
1 |
| Coordinate c; |
| 54 |
1 |
▶ | THIS->getCoordinate(c); |
Branch: 1 branch
| Branch | True | False | Total |
| THIS->getCoordinate(c); |
1 |
0 |
1 |
|
| 55 |
1 |
▶ | RETVAL = new Coordinate(c); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new Coordinate(c); |
1 |
0 |
1 |
|
| 56 |
1 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
|
| 57 |
|
| |
| 58 |
|
| |
| 59 |
|
| Coordinate* intersection( Coordinate& p1, Coordinate& p2, Coordinate& q1, Coordinate& q2) { |
| 60 |
1 |
| Coordinate c; |
| 61 |
1 |
▶ | HCoordinate::intersection(p1, p2, q1, q2, c); |
Branch: 1 branch
| Branch | True | False | Total |
| HCoordinate::intersection(p1, p2, q1, q2, c); |
1 |
0 |
1 |
|
| 62 |
1 |
▶ | RETVAL = new Coordinate(c); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new Coordinate(c); |
1 |
0 |
1 |
|
| 63 |
1 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
|
| 64 |
|
| |
| 65 |
|
| std::string HCoordinate::toString(...) { |
| 66 |
6 |
▶ | std::ostringstream out; |
Branch: 1 branch
| Branch | True | False | Total |
| std::ostringstream out; |
6 |
0 |
6 |
|
| 67 |
6 |
▶ | out << *THIS; |
Branch: 1 branch
| Branch | True | False | Total |
| out << *THIS; |
6 |
0 |
6 |
|
| 68 |
6 |
▶ | RETVAL = out.str(); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = out.str(); |
6 |
0 |
6 |
|
| 69 |
|
| } |
| 70 |
|
| |
| 71 |
0 |
▶ | int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
Branch: 1 branch
| Branch | True | False | Total |
| int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } |
0 |
0 |
0 |
|
| 72 |
|
| |
| 73 |
|
| BOOT { |
| 74 |
46 |
▶ | xs::exp::autoexport(Stash(__PACKAGE__)); |
Branch: 2 branches
| Branch | True | False | Total |
| xs::exp::autoexport(Stash(__PACKAGE__)); |
46 |
0 |
46 |
| xs::exp::autoexport(Stash(__PACKAGE__)); |
46 |
0 |
46 |
|
| 75 |
|
| } |