PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/python/import/base.h

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