Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashleighadams/luapp
Lua++, C++11 wrapper for Lua; header only (no linking required)!
https://github.com/ashleighadams/luapp
Last synced: 4 days ago
JSON representation
Lua++, C++11 wrapper for Lua; header only (no linking required)!
- Host: GitHub
- URL: https://github.com/ashleighadams/luapp
- Owner: AshleighAdams
- License: gpl-3.0
- Created: 2013-08-17T22:36:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-04T16:41:24.000Z (over 10 years ago)
- Last Synced: 2024-12-31T12:09:55.625Z (8 days ago)
- Language: C++
- Homepage:
- Size: 710 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Lua++
=========![Build Status](http://vps.arb0c.net/build/LuaPP/state.png)
Provides a modern Lua header-only wrapper, utilizing C++11 features and reamining
as close to Lua's syntax as possible.Some example(s):
```lua
function Test(...)
local args = {...}
for k,v in ipairs(args) do
print(type(v) .. ": " .. tostring(v))
end
end
``````c++
try
{
Lua::State state;
state.LoadStandardLibary();
state.DoFile("test.lua");
state["Test"]("Hello", Lua::NewTable(), 42, 3.141);
// you can create references to it:
Lua::Variable func = state["Test"];
func("world");
}
catch(Lua::Exception ex)
{
cout << "Lua exception: \n" << ex.what() << "\n";
}
```