<small id='ysCiG'></small><noframes id='ysCiG'>

  • <i id='ysCiG'><tr id='ysCiG'><dt id='ysCiG'><q id='ysCiG'><span id='ysCiG'><b id='ysCiG'><form id='ysCiG'><ins id='ysCiG'></ins><ul id='ysCiG'></ul><sub id='ysCiG'></sub></form><legend id='ysCiG'></legend><bdo id='ysCiG'><pre id='ysCiG'><center id='ysCiG'></center></pre></bdo></b><th id='ysCiG'></th></span></q></dt></tr></i><div id='ysCiG'><tfoot id='ysCiG'></tfoot><dl id='ysCiG'><fieldset id='ysCiG'></fieldset></dl></div>

  • <tfoot id='ysCiG'></tfoot>
    <legend id='ysCiG'><style id='ysCiG'><dir id='ysCiG'><q id='ysCiG'></q></dir></style></legend>

          <bdo id='ysCiG'></bdo><ul id='ysCiG'></ul>

        Lua - 反射 - 获取对象上的函数/字段列表?

        Lua - Reflection - Get list of functions/fields on an object?(Lua - 反射 - 获取对象上的函数/字段列表?)
      1. <tfoot id='ZnCP7'></tfoot>
          <i id='ZnCP7'><tr id='ZnCP7'><dt id='ZnCP7'><q id='ZnCP7'><span id='ZnCP7'><b id='ZnCP7'><form id='ZnCP7'><ins id='ZnCP7'></ins><ul id='ZnCP7'></ul><sub id='ZnCP7'></sub></form><legend id='ZnCP7'></legend><bdo id='ZnCP7'><pre id='ZnCP7'><center id='ZnCP7'></center></pre></bdo></b><th id='ZnCP7'></th></span></q></dt></tr></i><div id='ZnCP7'><tfoot id='ZnCP7'></tfoot><dl id='ZnCP7'><fieldset id='ZnCP7'></fieldset></dl></div>
            <tbody id='ZnCP7'></tbody>
          • <small id='ZnCP7'></small><noframes id='ZnCP7'>

            <legend id='ZnCP7'><style id='ZnCP7'><dir id='ZnCP7'><q id='ZnCP7'></q></dir></style></legend>

                  <bdo id='ZnCP7'></bdo><ul id='ZnCP7'></ul>
                • 本文介绍了Lua - 反射 - 获取对象上的函数/字段列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是 Lua 的新手,在程序的 alpha 版本中将 Lua 作为脚本语言处理.开发人员没有响应,我需要获取一些可从 Lua 代码访问的 C++ 对象提供的函数列表.

                  I'm new to Lua and dealing with Lua as a scripting language in an alpha release of a program. The developer is unresponsive and I need to get a list of functions provided by some C++ objects which are accessible from the Lua code.

                  有没有什么简单的方法可以查看这些对象暴露了哪些字段和函数?

                  Is there any easy way to see what fields and functions these objects expose?

                  推荐答案

                  在Lua中,查看一个对象的成员,可以使用:

                  In Lua, to view the members of a object, you can use:

                  for key,value in pairs(o) do
                      print("found member " .. key);
                  end
                  

                  不幸的是,我不知道这是否适用于从 C++ 导入的对象.

                  Unfortunately I don't know if this will work for objects imported from C++.

                  这篇关于Lua - 反射 - 获取对象上的函数/字段列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Constructor initialization Vs assignment(构造函数初始化 Vs 赋值)
                  Is a `=default` move constructor equivalent to a member-wise move constructor?(`=default` 移动构造函数是否等同于成员移动构造函数?)
                  Has the new C++11 member initialization feature at declaration made initialization lists obsolete?(声明时新的 C++11 成员初始化功能是否使初始化列表过时了?)
                  Order of constructor call in virtual inheritance(虚继承中构造函数调用的顺序)
                  How to use sfinae for selecting constructors?(如何使用 sfinae 选择构造函数?)
                  Initializing a union with a non-trivial constructor(使用非平凡的构造函数初始化联合)

                    • <bdo id='c7nuX'></bdo><ul id='c7nuX'></ul>

                            <tbody id='c7nuX'></tbody>
                        • <i id='c7nuX'><tr id='c7nuX'><dt id='c7nuX'><q id='c7nuX'><span id='c7nuX'><b id='c7nuX'><form id='c7nuX'><ins id='c7nuX'></ins><ul id='c7nuX'></ul><sub id='c7nuX'></sub></form><legend id='c7nuX'></legend><bdo id='c7nuX'><pre id='c7nuX'><center id='c7nuX'></center></pre></bdo></b><th id='c7nuX'></th></span></q></dt></tr></i><div id='c7nuX'><tfoot id='c7nuX'></tfoot><dl id='c7nuX'><fieldset id='c7nuX'></fieldset></dl></div>

                          <small id='c7nuX'></small><noframes id='c7nuX'>

                          <legend id='c7nuX'><style id='c7nuX'><dir id='c7nuX'><q id='c7nuX'></q></dir></style></legend>
                          <tfoot id='c7nuX'></tfoot>