summaryrefslogtreecommitdiff
path: root/Examples/ruby/import_template/bar.h
blob: 1aa907dfc2d0992e440c2d1d6aa22263a1911dae (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 const char * A() const { 
    return "Bar::A";
  }
  const char * B() const {
    return "Bar::B";
  }
  virtual Base<T> *toBase() {
    return static_cast<Base<T> *>(this);
  }
  static Bar<T> *fromBase(Base<T> *b) {
    return dynamic_cast<Bar<T> *>(b);
  }

};