/tags/rel-1-3-26/SWIG/Examples/perl5/import/foo.h
# · C++ Header · 21 lines · 18 code · 3 blank · 0 comment · 0 complexity · c833470c83fa6cb8df67846b589f2d43 MD5 · raw file
- #include "base.h"
- class Foo : public Base {
- public:
- Foo() { }
- ~Foo() { }
- virtual void A() {
- printf("I'm Foo::A\n");
- }
- void B() {
- printf("I'm Foo::B\n");
- }
- virtual Base *toBase() {
- return static_cast<Base *>(this);
- }
- static Foo *fromBase(Base *b) {
- return dynamic_cast<Foo *>(b);
- }
- };