Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 3c88344d1f3d15057277d028d0022277 > files > 577

swig-1.3.11-4mdk.i586.rpm

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