summaryrefslogtreecommitdiff
path: root/Examples/python/import/bar.h
blob: fa4185f1fb297191f001d186abde3d29664003e0 (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"

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

};