Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/python/import_template/foo.h
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

22 lines
361 B
C++

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