Release 0.0.2 of Swig Starter Kit was just released. This release sees the addition of template usage examples, including custom function templates and STL usage. Using a SWIG template declaration we are able to instantiate a specific template and use it from our script code.
//SWIG Code %include <std_string.i> %include <std_vector.i> %template(String_Vector) std::vector<std::string>;
We can now use the std container classes with our Lua code:
var = SwigStarterKit.String_Vector(); var:push_back("Hello"); var:push_back("World");