summaryrefslogtreecommitdiff
path: root/Examples/python/import_template/bar.h
blob: 500b67a3cf7c59d6cc84f612ddc5035a4ac8decc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "base.h"

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

};