diff --git a/pyste/example/virtual.h b/pyste/example/virtual.h new file mode 100644 index 00000000..e31183b4 --- /dev/null +++ b/pyste/example/virtual.h @@ -0,0 +1,23 @@ + +struct C +{ +public: + virtual int f() + { + return f_abs(); + } + + const char* get_name() + { + return name(); + } + +protected: + virtual int f_abs() = 0; + +private: + virtual const char* name() { return "C"; } +}; + +int call_f(C& c) { return c.f(); } + diff --git a/pyste/example/virtual.pyste b/pyste/example/virtual.pyste new file mode 100644 index 00000000..cd9b8669 --- /dev/null +++ b/pyste/example/virtual.pyste @@ -0,0 +1 @@ +Class('C', 'virtual.h')