t/typemap/object/join.xsi

filter: Statementstmt 100% 13 / 13 Branchbran 54.7% 23 / 42 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 65.4% 36 / 55 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/typemap/const.xsi ↑ Summary t/typemap/primitives.xsi »
1 MODE: INLINE
2  
3 class MyOther {
4 public:
5 int val;
6 MyOther (int arg) : val(arg) {}
7 virtual ~MyOther () { dcnt.c++; }
8 };
9  
10 namespace xs {
11 template <> struct Typemap<MyOther*> : TypemapObject<MyOther*, MyOther*, ObjectTypePtr, ObjectStorageMG, DynamicCast> {
12 static std::string package () { return "MyTest::MyOther"; }
13 };
14 }
15  
16 MODULE = MyTest::Typemap::Object PACKAGE = MyTest::MyOther
17 PROTOTYPES: DISABLE
18  
19 BOOT {
20 35 ▶ Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild"));
Branch: 3 branches
BranchTrueFalseTotal
Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild")); 35 0 35
Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild")); 35 0 35
Stash("MyTest::MyOther").inherit(Stash("MyTest::MyChild")); 35 0 35
21 }
22  
23 MyOther* MyOther::new (int arg1, int arg2) {
24 3 PROTO = Sub(cv).SUPER().call(&ST(0), items);
25 3 ▶ if (!PROTO.defined()) XSRETURN_UNDEF;
Branch: 1 branch
BranchTrueFalseTotal
if (!PROTO.defined()) XSRETURN_UNDEF; 3 0 3
26 3 ▶ RETVAL = new MyOther(arg1 + arg2);
Branch: 3 branches
BranchTrueFalseTotal
RETVAL = new MyOther(arg1 + arg2); 3 0 3
RETVAL = new MyOther(arg1 + arg2); 3 0 3
RETVAL = new MyOther(arg1 + arg2); 3 0 3
27 3 ▶}
Branch: 2 branches
BranchTrueFalseTotal
} 3 0 3
} 1 2 3
28 2 ▶ 
Branch: 2 branches
BranchTrueFalseTotal
2 0 2
2 0 2
29 int MyOther::other_val (SV* newval = NULL) {
30 4 ▶ if (newval) THIS->val = SvIV(newval);
Branch: 1 branch
BranchTrueFalseTotal
if (newval) THIS->val = SvIV(newval); 0 4 4
31 4 ▶ RETVAL = THIS->val;
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = THIS->val; 0 4 4
32 }
33  
34 void MyOther::set_from (MyOther* other) {
35 2 ▶ Sub(cv).SUPER().call(&ST(0), items);
Branch: 3 branches
BranchTrueFalseTotal
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
36 2 ▶ if (other) THIS->val = other->val;
Branch: 1 branch
BranchTrueFalseTotal
if (other) THIS->val = other->val; 1 1 2
37 }
38  
39 void MyOther::DESTROY () {
40 2 dcnt.perl++;
41 2 ▶ Sub(cv).SUPER().call(&ST(0), items);
Branch: 3 branches
BranchTrueFalseTotal
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
Sub(cv).SUPER().call(&ST(0), items); 2 0 2
42 2 ▶}
Branch: 1 branch
BranchTrueFalseTotal
} 2 0 2
« t/typemap/const.xsi ↑ Summary t/typemap/primitives.xsi »