| 1 |
|
| MODE: INLINE |
| 2 |
|
| |
| 3 |
|
| struct Base06 { |
| 4 |
|
| virtual const char* method() { return "from base"; } |
| 5 |
|
| virtual ~Base06() { } |
| 6 |
|
| }; |
| 7 |
|
| |
| 8 |
|
| struct Derived06A: public Base06 { |
| 9 |
|
| virtual const char* method() { return "from derived-A"; } |
| 10 |
|
| const char* specific_method() { return "specific-A"; } |
| 11 |
|
| }; |
| 12 |
|
| |
| 13 |
|
| struct Derived06B: public Base06 { |
| 14 |
|
| virtual const char* method() { return "from derived-B"; } |
| 15 |
|
| const char* specific_method() { return "specific-B"; } |
| 16 |
|
| }; |
| 17 |
|
| |
| 18 |
|
| |
| 19 |
|
| namespace xs { |
| 20 |
|
| template <typename D> |
| 21 |
|
| struct Typemap<Base06*, D> : TypemapObject<Base06*, D, ObjectTypePtr, ObjectStorageMG, StaticCast> { |
| 22 |
|
| static std::string package () { return "MyTest::Cookbook::Base04"; } |
| 23 |
|
| }; |
| 24 |
|
| |
| 25 |
|
| template <> struct Typemap<Derived06A*> : Typemap<Base06*, Derived06A*> { |
| 26 |
|
| static std::string package () { return "MyTest::Cookbook::Derived06A"; } |
| 27 |
|
| }; |
| 28 |
|
| |
| 29 |
|
| template <> struct Typemap<Derived06B*> : Typemap<Base06*, Derived06B*> { |
| 30 |
|
| static std::string package () { return "MyTest::Cookbook::Derived06B"; } |
| 31 |
|
| }; |
| 32 |
|
| |
| 33 |
|
| } |
| 34 |
|
| |
| 35 |
|
| MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Base06 |
| 36 |
|
| PROTOTYPES: DISABLE |
| 37 |
|
| |
| 38 |
0 |
| const char* Base06::method() |
| 39 |
|
| |
| 40 |
0 |
| Base06* Base06::new() |
| 41 |
0 |
▶ | |
Branch: 1 branch
| Branch | True | False | Total |
|
0 |
0 |
0 |
|
| 42 |
0 |
▶ | MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Derived06A |
Branch: 2 branches
| Branch | True | False | Total |
| MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Derived06A |
0 |
0 |
0 |
| MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Derived06A |
0 |
0 |
0 |
|
| 43 |
|
| PROTOTYPES: DISABLE |
| 44 |
|
| |
| 45 |
0 |
| Derived06A* Derived06A::new() |
| 46 |
0 |
▶ | |
Branch: 1 branch
| Branch | True | False | Total |
|
0 |
0 |
0 |
|
| 47 |
0 |
▶ | const char* Derived06A::specific_method() |
Branch: 2 branches
| Branch | True | False | Total |
| const char* Derived06A::specific_method() |
0 |
0 |
0 |
| const char* Derived06A::specific_method() |
0 |
0 |
0 |
|
| 48 |
|
| |
| 49 |
|
| BOOT { |
| 50 |
35 |
▶ | Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
Branch: 2 branches
| Branch | True | False | Total |
| Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
35 |
0 |
35 |
| Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
35 |
0 |
35 |
|
| 51 |
|
| } |
| 52 |
|
| |
| 53 |
|
| MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::Derived06B |
| 54 |
|
| PROTOTYPES: DISABLE |
| 55 |
|
| |
| 56 |
0 |
| Derived06B* Derived06B::new() |
| 57 |
0 |
▶ | |
Branch: 1 branch
| Branch | True | False | Total |
|
0 |
0 |
0 |
|
| 58 |
0 |
▶ | const char* Derived06B::specific_method() |
Branch: 2 branches
| Branch | True | False | Total |
| const char* Derived06B::specific_method() |
0 |
0 |
0 |
| const char* Derived06B::specific_method() |
0 |
0 |
0 |
|
| 59 |
|
| |
| 60 |
|
| BOOT { |
| 61 |
35 |
▶ | Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
Branch: 2 branches
| Branch | True | False | Total |
| Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
35 |
0 |
35 |
| Stash(__PACKAGE__).inherit("MyTest::Cookbook::Base06"); |
35 |
0 |
35 |
|
| 62 |
|
| } |