swig/Examples/python/import/bar.h
William S Fulton 8dced082d4 Update for new runtime library approach (no more -runtime -noruntime)
Comment about inline destructors needed for some compilers added


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6535 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-27 20:59:55 +00:00

22 lines
326 B
C++

#include "base.h"
class Bar : public Base {
public:
Bar() { }
~Bar() { }
virtual void A() {
printf("I'm Bar::A\n");
}
void B() {
printf("I'm Bar::B\n");
}
virtual Base *toBase() {
return static_cast<Base *>(this);
}
static Bar *fromBase(Base *b) {
return dynamic_cast<Bar *>(b);
}
};