| 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
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| if (!PROTO.defined()) XSRETURN_UNDEF; |
3 |
0 |
3 |
|
| 26 |
3 |
▶ | RETVAL = new MyOther(arg1 + arg2); |
Branch: 3 branches
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| } |
3 |
0 |
3 |
| } |
1 |
2 |
3 |
|
| 28 |
2 |
▶ | |
Branch: 2 branches
| Branch | True | False | Total |
|
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
| Branch | True | False | Total |
| if (newval) THIS->val = SvIV(newval); |
0 |
4 |
4 |
|
| 31 |
4 |
▶ | RETVAL = THIS->val; |
Branch: 1 branch
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| 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
| Branch | True | False | Total |
| } |
2 |
0 |
2 |
|