PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/ruby/import_template/bar.h

#
C++ Header | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | 78f5e8bc28edaa448ec8c543df212db2 MD5 | raw file
 1#include "base.h"
 2
 3template<class T> class Bar : public Base<T> {
 4 public:
 5  Bar() { }
 6  ~Bar() { }
 7  virtual const char * A() const { 
 8    return "Bar::A";
 9  }
10  const char * B() const {
11    return "Bar::B";
12  }
13  virtual Base<T> *toBase() {
14    return static_cast<Base<T> *>(this);
15  }
16  static Bar<T> *fromBase(Base<T> *b) {
17    return dynamic_cast<Bar<T> *>(b);
18  }
19
20};
21
22