PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/ruby/import/foo.h

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