summaryrefslogtreecommitdiff
path: root/Examples/python/import/foo.h
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/python/import/foo.h')
-rw-r--r--Examples/python/import/foo.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/python/import/foo.h b/Examples/python/import/foo.h
new file mode 100644
index 0000000..dd51840
--- /dev/null
+++ b/Examples/python/import/foo.h
@@ -0,0 +1,21 @@
+#include "base.h"
+
+class Foo : public Base {
+ public:
+ Foo() { }
+ ~Foo() { }
+ virtual void A() {
+ printf("I'm Foo::A\n");
+ }
+ void B() {
+ printf("I'm Foo::B\n");
+ }
+ virtual Base *toBase() {
+ return static_cast<Base *>(this);
+ }
+ static Foo *fromBase(Base *b) {
+ return dynamic_cast<Foo *>(b);
+ }
+};
+
+