init project
This commit is contained in:
commit
821ea7eed0
16 changed files with 950 additions and 0 deletions
28
include/lua/loader.hpp
Normal file
28
include/lua/loader.hpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
#include <lua.hpp>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
class LuaLoader {
|
||||
public:
|
||||
LuaLoader();
|
||||
|
||||
~LuaLoader();
|
||||
|
||||
void AddLuaPath(const std::string&);
|
||||
void AddCPath(const std::string&);
|
||||
void Call(const std::string& lua_module, const std::string& function);
|
||||
void LoadToGlobal(const std::string&);
|
||||
|
||||
std::vector<std::string> GetListScripts(const std::string&) const;
|
||||
|
||||
private:
|
||||
void Import(const std::string&, const std::string&, int);
|
||||
void LoadImpl(const std::string&);
|
||||
|
||||
void ForEachByStringArray(std::function<void(const std::string&)>);
|
||||
void ParseRequire();
|
||||
void ParseImport();
|
||||
|
||||
lua_State* L;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue