From 2c0ec733ca59bfebab893328c6ef497a54fb7b07 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 14 Mar 2003 23:39:05 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'. [SVN r17932] --- pyste/example/virtual.h | 23 +++++++++++++++++++++++ pyste/example/virtual.pyste | 1 + 2 files changed, 24 insertions(+) create mode 100644 pyste/example/virtual.h create mode 100644 pyste/example/virtual.pyste 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')