⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pure_out_value.rst.svn-base

📁 本人找过多个在linux下c++的lua5.1封装库,但很少.luabind已经release的版本只支持lua5.0.这个版本是我从其cvs(svc)上取出的并支持最新的lua5.1.强烈推荐.
💻 SVN-BASE
字号:
pure_out_value----------------Motivation~~~~~~~~~~This works exactly like ``out_value``, except that it will pass adefault constructed object instead of converting an argument fromLua. This means that the parameter will be removed from the luasignature.Defined in~~~~~~~~~~.. parsed-literal::    #include <luabind/out_value_policy.hpp>Synopsis~~~~~~~~.. parsed-literal::    pure_out_value(index, policies = none)Parameters~~~~~~~~~~=============== =============================================================Parameter       Purpose=============== =============================================================``index``       The index of the parameter to be used as an out parameter.``policies``    The policies used internally to convert the out parameter                to Lua. ``_1`` is used as the internal index.=============== =============================================================Example~~~~~~~Note that no values are passed to the calls to ``f1`` and ``f2``... parsed-literal::    void f1(float& val) { val = 10.f; }    void f2(float\* val) { \*val = 10.f; }    module(L)    [        def("f", &f, **pure_out_value(_1)**)    ];    Lua 5.0  Copyright (C) 1994-2003 Tecgraf, PUC-Rio    > print(f1())    10    > print(f2())    10

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -