mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17932]
This commit is contained in:
23
pyste/example/virtual.h
Normal file
23
pyste/example/virtual.h
Normal file
@@ -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(); }
|
||||
|
||||
1
pyste/example/virtual.pyste
Normal file
1
pyste/example/virtual.pyste
Normal file
@@ -0,0 +1 @@
|
||||
Class('C', 'virtual.h')
|
||||
Reference in New Issue
Block a user