« xsi/noding/SegmentIntersectionDetector.xsi
↑ Summary
xsi/noding/SingleInteriorIntersectionFinder.xsi »
| 1 | MODULE = Geo::Geos PACKAGE = Geo::Geos::Coordinate | ||||||||||||||||||||||||||||||
| 2 | PROTOTYPES: DISABLE | ||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||
| 4 | 0 | ▶ | Sv getNull () { RETVAL = coordinate_get_null(); } | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||
| 6 | Coordinate* new(SV*, double x = 0, double y = 0, SV* z = NULL) { | ||||||||||||||||||||||||||||||
| 7 | 316 | RETVAL = new Coordinate(x, y, z ? SvNV(z) : DoubleNotANumber); | |||||||||||||||||||||||||||||
| 8 | 316 | ▶ | } | ||||||||||||||||||||||||||||
|
Branch: 6 branches
| |||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||
| 10 | double Coordinate::x(SV* newval = NULL) : ALIAS(y=1,z=2) { | ||||||||||||||||||||||||||||||
| 11 | double* val; | ||||||||||||||||||||||||||||||
| 12 | 8 | switch (ix) { | |||||||||||||||||||||||||||||
| 13 | 3 | case 0: val = &THIS->x; break; | |||||||||||||||||||||||||||||
| 14 | 3 | case 1: val = &THIS->y; break; | |||||||||||||||||||||||||||||
| 15 | 2 | default: val = &THIS->z; break; | |||||||||||||||||||||||||||||
| 16 | } | ||||||||||||||||||||||||||||||
| 17 | 8 | ▶ | if (newval) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 18 | 0 | ▶ | if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 19 | 0 | *val = SvNV(newval); | |||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||
| 21 | 8 | ▶ | RETVAL = *val; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||
| 24 | void Coordinate::setNull() { | ||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 26 | 0 | THIS->setNull(); | |||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||
| 29 | 3 | ▶ | bool Coordinate::isNull() | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||
| 31 | 10 | ▶ | bool Coordinate::equals (Coordinate& other) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||
| 33 | 6 | ▶ | bool Coordinate::equals2D (Coordinate& other) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||
| 35 | 6 | ▶ | bool Coordinate::equals3D (Coordinate& other) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||
| 37 | 6 | ▶ | int Coordinate::compareTo (Coordinate& other) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||
| 39 | bool Coordinate::eq (Sv other_arg, SV*) { | ||||||||||||||||||||||||||||||
| 40 | 48 | ▶ | auto* other = xs::in<Coordinate*>(other_arg); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 41 | 48 | ▶ | RETVAL = other ? THIS->equals(*other) : false; | ||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||
| 45 | 132 | ▶ | std::string Coordinate::toString (...) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||
| 47 | 6 | ▶ | double Coordinate::distance (Coordinate& other) | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||
| 49 | 0 | ▶ | int Coordinate::hashCode () | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||
| 51 | 0 | ▶ | int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||