More comprehensive test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d5c943f17a
commit
8a2a92d720
1 changed files with 15 additions and 2 deletions
|
|
@ -10,9 +10,13 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
struct Person {
|
||||
struct Being {
|
||||
virtual std::string id() { return "Being"; }
|
||||
virtual ~Being() {}
|
||||
};
|
||||
|
||||
struct Person : Being {
|
||||
virtual std::string id() { return "Person"; }
|
||||
virtual ~Person() {}
|
||||
};
|
||||
|
||||
struct Child : Person {
|
||||
|
|
@ -23,6 +27,15 @@ struct GrandChild : Child {
|
|||
virtual std::string id() { return "GrandChild"; }
|
||||
};
|
||||
|
||||
// Orphans - don't override id() in C++
|
||||
struct OrphanPerson : Person {
|
||||
// no overridden id()
|
||||
};
|
||||
|
||||
struct OrphanChild : Child {
|
||||
// no overridden id()
|
||||
};
|
||||
|
||||
class Caller {
|
||||
private:
|
||||
Person *_callback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue