Giter VIP home page Giter VIP logo

soluabind's Introduction

SoLuaBind

a lua bind solution in c++
这套代码用来实现C++代码与lua代码的交互,互相调用函数,互相传递数据。
本套代码对应的lua版本为5.1。只需稍加修改,就可以支持lua其他版本。

class SoLua 能够做的:
1,创建并初始化一个lua_State对象;
2,加载并执行一个lua脚本文件;
3,执行一段lua代码;
4,压入参数,执行一个lua脚本函数,然后获取返回值;
5,压入参数,获取lua脚本中的指定的table的某些字段值;

class SoLuaBind 能够做的:
1,向lua环境中注册C++函数;
2,压入数组元素值,向lua环境中注册一个table类型的数组,下标从1开始;
3,压入键值对,向lua环境中注册一个table;

在 main.cpp 中有详细的示范代码。

进阶好帖 http://blog.csdn.net/oilcode/article/details/51086147

soluabind's People

Contributors

oilcode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.