分享

OOLua

 quasiceo 2016-07-14

OOLua

OOLua is a cross-platform, test driven, dependency-free and Open Source library which uses C++03 template metaprogramming along with preprocessor magic to provide a fast binding between C++ and Lua.

Although the name of the library is OOLua you do not need to expose C++ classes or use the library in an OO manner; the only hierarchy of classes that the library defines for itself are exception types when they are enabled.

The library provides:
  • The ability to easily bind stand-alone functions.
  • Interaction with the stack using a simple typed interface.
  • Simplified method to call Lua functions from C++.
  • Ease of configurability.
  • Error checking either with or without exceptions.
  • Simple typed Lua registry references.
  • Interaction with Lua tables using a simple type.
  • Passing C++ classes and user types as light userdata.
  • Exposing C++ classes and hierarchies as full userdata without using C++'s RTTI and in a none-intrusive manner.
  • Abilty to control which language owns which full userdata instances.
  • Binding member/virtual functions on full userdata.
  • Binding static functions for full userdata types.
  • Binding class enumerations.
  • Binding public members.
  • Constructors for full userdata classes.
  • Compatibility with Rio Lua 5.1, 5.2 and 5.3 also LuaJIT 1.1 and 2.0
  • A guarantee that it does not call new willy-nilly.
  • Support for shared_ptr.
  • Support for C++11 scoped enums.
Basically you can use as little or as much of the library as you like.

Yes the library does "cover the problem with clever template metaprogramming and macros".

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章