|
dl
|
lua脚本语言 更多...
#include <dl_lua.h>
类 | |
| struct | Env |
Public 成员函数 | |
| LuaScript () | |
| ~LuaScript () | |
| void | SetPathRoot (std::string_view str) |
| 设置加载根路径 | |
| bool | DoString (std::string_view str) |
| 执行lua字符串 | |
| bool | DoFile (std::string_view path_name) |
| 执行lua文件 | |
| bool | DoFileEx (std::string_view path_name, LuaRef &ret) |
| 执行lua文件,并获取返回值 | |
| bool | CallFunction (LuaRef func) |
| 调用函数 | |
| std::string | GetRefString (LuaRef ref) |
| 返回lua对象字符串 | |
| Env & | GetEnv () |
| lua_State * | GetL () |
| void | RegisterAll () |
| dl::LuaScript::LuaScript | ( | ) |
| dl::LuaScript::~LuaScript | ( | ) |
| bool dl::LuaScript::CallFunction | ( | LuaRef | func | ) |
调用函数
| [in] | func | lua对象(函数) |
| bool dl::LuaScript::DoFile | ( | std::string_view | path_name | ) |
执行lua文件
| bool dl::LuaScript::DoFileEx | ( | std::string_view | path_name, |
| LuaRef & | ret ) |
执行lua文件,并获取返回值
| bool dl::LuaScript::DoString | ( | std::string_view | str | ) |
执行lua字符串
| std::string dl::LuaScript::GetRefString | ( | LuaRef | ref | ) |
返回lua对象字符串
| [in] | func | lua对象(函数、字符串) |
| 失败返回空(不会打印) |
| void dl::LuaScript::RegisterAll | ( | ) |