pioneerspacesim/pioneer — pull request #1438 by laarmen (2012-08-16 15:33:57+00:00)
Title: Luatable

These files add two classes to ease the pain of dealing with Lua tables.

LuaTable is a simple wrapper around a table within the current lua stack. You cannot use it to store a table on the C++ side, and it does the strict minimum WRT to type safety.

PersistentTable is a class that allows the persistent storage of a table. It relies on LuaTable for interfacing with the table itself.

I also wrote some helper functions to be able to provide a template interface to LuaTable instead of multiplying the methods for every key/value combination. I plan on using those helper functions in a subsequent PR to make adding event doable on the Lua side.