PageRenderTime 43ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-24/SWIG/Examples/ruby/import_template/base.h

#
C++ Header | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | 3d6d9a360df2734b05469bc181256214 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1#include <stdio.h>
 2
 3template<class T> class Base {
 4 public:
 5     Base() { };
 6     virtual ~Base() { };
 7     virtual const char * A() const {
 8         return "Base::A";
 9     }
10     const char * B() const {
11       return "Base::B";
12     }
13     virtual Base<T> *toBase() {
14       return static_cast<Base<T> *>(this);
15     }
16};
17 
18