Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 58f5a40828161dc688bc640be9c7bd55 > files > 565

swig-1.3.11-4mdk.ppc.rpm

#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);
  }
};