liunnu / luna-gen Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zpl-zak/luna-gen
Automatically exported from code.google.com/p/luna-gen
This project forked from zpl-zak/luna-gen
Automatically exported from code.google.com/p/luna-gen
= Files = test_luna/*.lua : self-contained examples (run make.sh to run) These examples use CMake. If you don't want to use CMake, see "examples/gen.sh". luna_gen.lua: the code generator. mylib*.lua: the code generator depends on these files, but output codes do not. luna.h/cpp: the output code depends only on these files. luna.h is worth reading (at least lunaStack class). examples/*.lua : real-world examples that use all available functionalities (run gen.sh to convert.) The real-world examples do not run on your system because of missing dependencies. see examples/README for details. This file explains how to call a lua function from c. = Supported type = class ( corresponds to a userdata that has a metatable ) module ( corresponds to a table. Multiple modules can have the same name. ) = Supported class properties = name className inheritsFrom ctors wrapperCode : custom function definitions (any valid c++ code which goes into the output cpp file.) decl : custom class declarations (any valid c++ code which goes into the output header file) globalWrapperCode :custom function definitions (any valid c++ code which goes into the output cpp file.) ifdef ifndef if_ isLuaInheritable enums staticMemberFunctions memberFunctionsFromFile memberFunctions isExtendableFromLua : for c++ inheritance from lua. See test_inheritance.lua properties read_properties write_properties customFunctionsToRegister : luna-gen can register a custom function 'int funcName(lua_State* L)' Sorry for the lack of documentations. Search for keyword in examples to see its usage, or ask me so that I can update this document. = Notes for luabind users = 1. luabind: luabind::def("createVRMLskin", &RE::createVRMLskin,luabind::adopt(luabind::result)) luna-gen: PLDPrimVRML* RE::createVRMLskin(VRMLloader*pTgtSkel, bool bDrawSkeleton) @ ;adopt=true; 2. luabind: .enum_("constants") [ luabind::value("EULER",OpenHRP::DynamicsSimulator::EULER) ] luna-gen: enums={ {"EULER", "(int)OpenHRP::DynamicsSimulator::EULER"}, } 3. luabind: .scope_[..] luna-gen: staticMemberFunctions={[[..]]} 4. luabind: #ifndef AAA luabind::def("abc"...) #endif luna-gen: void abc() @ ;ifndef=AAA; 5. luabind: #ifndef AAA luabind::class_<asdf>("asdf")[...] #endif luna-gen: { name='asdf', ifndef='AAA', } [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.