diff options
Diffstat (limited to 'Examples/lua/import/foo.h')
-rw-r--r-- | Examples/lua/import/foo.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/lua/import/foo.h b/Examples/lua/import/foo.h new file mode 100644 index 0000000..1abe2c0 --- /dev/null +++ b/Examples/lua/import/foo.h @@ -0,0 +1,21 @@ +#include "base.h" + +class Foo : public Base { + public: + Foo() { } + ~Foo() { } + virtual const char * A() const { + return "Foo::A"; + } + const char * B() const { + return "Foo::B"; + } + virtual Base *toBase() { + return static_cast<Base *>(this); + } + static Foo *fromBase(Base *b) { + return dynamic_cast<Foo *>(b); + } +}; + + |