xsi/Coordinate.xsi

filter: Statementstmt 70.8% 17 / 24 Branchbran 46.0% 23 / 50 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 54.0% 40 / 74 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« 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
BranchTrueFalseTotal
Sv getNull () { RETVAL = coordinate_get_null(); } 0 0 0
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
BranchTrueFalseTotal
} 316 0 316
} 7 309 316
} 7 0 7
} 316 0 316
} 316 0 316
} 0 0 0
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
BranchTrueFalseTotal
if (newval) { 0 8 8
18 0 ▶ if (SvREADONLY(ST(0))) throw "cannot modify readonly object";
Branch: 1 branch
BranchTrueFalseTotal
if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; 0 0 0
19 0 *val = SvNV(newval);
20 }
21 8 ▶ RETVAL = *val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = *val; 0 8 8
22 }
23  
24 void Coordinate::setNull() {
25 0 ▶ if (SvREADONLY(ST(0))) throw "cannot modify readonly object";
Branch: 1 branch
BranchTrueFalseTotal
if (SvREADONLY(ST(0))) throw "cannot modify readonly object"; 0 0 0
26 0 THIS->setNull();
27 }
28  
29 3 ▶bool Coordinate::isNull()
Branch: 1 branch
BranchTrueFalseTotal
bool Coordinate::isNull() 0 3 3
30  
31 10 ▶bool Coordinate::equals (Coordinate& other)
Branch: 1 branch
BranchTrueFalseTotal
bool Coordinate::equals (Coordinate& other) 6 4 10
32  
33 6 ▶bool Coordinate::equals2D (Coordinate& other)
Branch: 1 branch
BranchTrueFalseTotal
bool Coordinate::equals2D (Coordinate& other) 2 4 6
34  
35 6 ▶bool Coordinate::equals3D (Coordinate& other)
Branch: 1 branch
BranchTrueFalseTotal
bool Coordinate::equals3D (Coordinate& other) 2 4 6
36  
37 6 ▶int Coordinate::compareTo (Coordinate& other)
Branch: 1 branch
BranchTrueFalseTotal
int Coordinate::compareTo (Coordinate& other) 0 6 6
38  
39 bool Coordinate::eq (Sv other_arg, SV*) {
40 48 ▶ auto* other = xs::in<Coordinate*>(other_arg);
Branch: 1 branch
BranchTrueFalseTotal
auto* other = xs::in<Coordinate*>(other_arg); 48 0 48
41 48 ▶ RETVAL = other ? THIS->equals(*other) : false;
Branch: 4 branches
BranchTrueFalseTotal
RETVAL = other ? THIS->equals(*other) : false; 48 0 48
RETVAL = other ? THIS->equals(*other) : false; 48 0 48
RETVAL = other ? THIS->equals(*other) : false; 48 0 48
RETVAL = other ? THIS->equals(*other) : false; 48 0 48
42 }
43  
44  
45 132 ▶std::string Coordinate::toString (...)
Branch: 1 branch
BranchTrueFalseTotal
std::string Coordinate::toString (...) 132 0 132
46  
47 6 ▶double Coordinate::distance (Coordinate& other)
Branch: 1 branch
BranchTrueFalseTotal
double Coordinate::distance (Coordinate& other) 0 6 6
48  
49 0 ▶int Coordinate::hashCode ()
Branch: 1 branch
BranchTrueFalseTotal
int Coordinate::hashCode () 0 0 0
50  
51 0 ▶int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; }
Branch: 1 branch
BranchTrueFalseTotal
int CLONE_SKIP (...) { PERL_UNUSED_VAR(items); RETVAL = 1; } 0 0 0
« xsi/noding/SegmentIntersectionDetector.xsi ↑ Summary xsi/noding/SingleInteriorIntersectionFinder.xsi »