| line | stmt | bran | cond | sub | pod | time | code | 
| 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 | 10 |  |  |  |  |  | if (!arg2) { | 
| 6 | 5 | 100 |  |  |  |  | auto c = xs::in(arg1); | 
| 7 | 1 | 50 |  |  |  |  | RETVAL = new HCoordinate(*c); | 
| 8 | 1 | 50 |  |  |  |  | } | 
|  |  | 50 |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | else if(!arg3) { | 
| 10 | 4 | 100 |  |  |  |  | Object obj1 {arg1}, obj2{arg2}; | 
| 11 | 4 | 50 |  |  |  |  | if(!obj1) throw("wrong argument"); | 
|  |  | 50 |  |  |  |  |  | 
| 12 | 2 | 50 |  |  |  |  | if(!obj2) throw("wrong argument"); | 
| 13 | 2 | 50 |  |  |  |  | if (obj1.stash().name() == "Geo::Geos::Algorithm::HCoordinate") { | 
| 14 | 2 | 50 |  |  |  |  | auto& c1 = xs::in(obj1); | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 100 |  |  |  |  |  | 
| 15 | 1 | 50 |  |  |  |  | auto& c2 = xs::in(obj1); | 
| 16 | 1 | 50 |  |  |  |  | RETVAL = new HCoordinate(c1, c2); | 
| 17 | 1 | 50 |  |  |  |  | } | 
|  |  | 50 |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | else { | 
| 19 |  |  |  |  |  |  | auto& c1 = xs::in(obj1); | 
| 20 | 1 | 50 |  |  |  |  | auto& c2 = xs::in(obj1); | 
| 21 | 1 | 50 |  |  |  |  | RETVAL = new HCoordinate(c1, c2); | 
| 22 | 1 | 50 |  |  |  |  | } | 
|  |  | 50 |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | } | 
| 24 |  |  |  |  |  |  | else if(!arg4) { | 
| 25 | 2 | 100 |  |  |  |  | if(!arg1) throw("undef not allowed"); | 
| 26 | 1 | 50 |  |  |  |  | if(!arg2) throw("undef not allowed"); | 
| 27 | 1 | 50 |  |  |  |  | if(!arg3) throw("undef not allowed"); | 
| 28 | 1 | 50 |  |  |  |  | RETVAL = new HCoordinate(Simple(arg1), Simple(arg2), Simple(arg3)); | 
| 29 | 1 | 50 |  |  |  |  | } | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | else { | 
| 31 |  |  |  |  |  |  | auto& c1 = xs::in(arg1); | 
| 32 | 1 | 50 |  |  |  |  | auto& c2 = xs::in(arg2); | 
| 33 | 1 | 50 |  |  |  |  | auto& c3 = xs::in(arg3); | 
| 34 | 1 | 50 |  |  |  |  | auto& c4 = xs::in(arg4); | 
| 35 | 1 | 50 |  |  |  |  | RETVAL = new HCoordinate(c1, c2, c3, c4); | 
| 36 | 1 | 50 |  |  |  |  | } | 
|  |  | 50 |  |  |  |  |  | 
| 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 | 50 |  |  |  |  | if (newval) { | 
| 47 | 0 | 0 |  |  |  |  | *val = SvNV(newval); | 
|  |  | 0 |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | } | 
| 49 | 8 |  |  |  |  |  | RETVAL = *val; | 
| 50 |  |  |  |  |  |  | } | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | Coordinate* HCoordinate::getCoordinate() { | 
| 53 | 2 |  |  |  |  |  | Coordinate c; | 
| 54 | 1 | 50 |  |  |  |  | THIS->getCoordinate(c); | 
| 55 | 1 | 50 |  |  |  |  | RETVAL = new Coordinate(c); | 
| 56 | 1 | 50 |  |  |  |  | } | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | Coordinate* intersection( Coordinate& p1,  Coordinate& p2, Coordinate& q1,  Coordinate& q2) { | 
| 60 | 2 |  |  |  |  |  | Coordinate c; | 
| 61 | 1 | 50 |  |  |  |  | HCoordinate::intersection(p1, p2, q1, q2, c); | 
| 62 | 1 | 50 |  |  |  |  | RETVAL = new Coordinate(c); | 
| 63 | 1 | 50 |  |  |  |  | } | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | std::string HCoordinate::toString(...) { | 
| 66 | 12 | 50 |  |  |  |  | std::ostringstream out; | 
| 67 | 6 | 50 |  |  |  |  | out << *THIS; | 
| 68 | 6 | 50 |  |  |  |  | RETVAL = out.str(); | 
|  |  | 50 |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | } | 
| 70 |  |  |  |  |  |  |  | 
| 71 | 0 |  |  |  |  |  | int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | BOOT { | 
| 74 | 46 | 50 |  |  |  |  | xs::exp::autoexport(Stash(__PACKAGE__)); | 
|  |  | 50 |  |  |  |  |  | 
| 75 |  |  |  |  |  |  | } |