Adding the beginnings of an example for cross module inheritance. Not
building yet 'cause I don't understand waf. Why does every project I look at use a different build system!
This commit is contained in:
1 parent
2560c98f5e
commit
37dcfcb514
6 files changed
+126
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#ifndef __PYBINDGEN_CROSS_MODULE_EXAMPLE_CLASSES_HH__
|
||||
#define __PYBINDGEN_CROSS_MODULE_EXAMPLE_CLASSES_HH__
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class Base {
|
||||
public:
|
||||
Base() { std::cerr << "Base::Base()" << std::endl; }
|
||||
virtual ~Base() { std::cerr << "Base::~Base()" << std::endl; }
|
||||
virtual void do_something() const { std::cerr << "Base::do_something()" << std::endl; }
|
||||
};
|
||||
|
||||
class Derived: public Base {
|
||||
public:
|
||||
Derived(): Base() { std::cerr << "Derived::Derived()" << std::endl; }
|
||||
virtual ~Derived() { std::cerr << "Derived::~Derived()" << std::endl; }
|
||||
virtual void do_something() const { std::cerr << "Derived::do_something()" << std::endl; }
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user