PageRenderTime 12ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/tcl/import/bar.h

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