swig/Examples/lua/import_template
Erez Geva a1b3ca81ca More Lua tests (#3405)
- Add Lua examples
- Add and fix unused Lua tests
- Add lua_module_global complementary test of lua_no_module_global
- Add Lua test-suite runme files

Enable friends_nested and minherit inline test code for Lua via the
SWIGLUA guards.
2026-05-31 15:09:53 +01:00
..
Makefile More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
README More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
bar.h More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
bar.i More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
base.h More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
base.i More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
foo.h More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
foo.i More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
runme.lua More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
spam.h More Lua tests (#3405) 2026-05-31 15:09:53 +01:00
spam.i More Lua tests (#3405) 2026-05-31 15:09:53 +01:00

README

This example tests the %import directive and working with multiple modules.

Use 'lua runme.lua' to run a test.

Overview:
---------

The example defines 4 different extension modules--each wrapping
a separate C++ class.

     base.i     -  Base class
     foo.i      -  Foo class derived from Base
     bar.i      -  Bar class derived from Base
     spam.i     -  Spam class derived from Bar

Each module uses %import to refer to another module.  For
example, the 'foo.i' module uses '%import base.i' to get
definitions for its base class.