Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
luaEngine.hpp
Go to the documentation of this file.
1 
12 #ifndef __SERVER_LUA_ENGINE_HPP_
13 #define __SERVER_LUA_ENGINE_HPP_
14 
15 #ifdef _WIN32
16 #if _MSC_VER > 1000
17 #pragma once
18 #endif
19 #endif
20 
21 #if defined(__unix__) && defined(__clang__)
22 #pragma once
23 #endif
24 
25 #include "../../pch.hpp"
26 
27 #if CB_USE_SOL == false
28 extern "C" {
30 #include <lua.h>
31 #include <luajit.h>
32 #include <lauxlib.h>
33 #include <lualib.h>
34 }
35 #include <any>
36 #else
37 #define SOL_ALL_SAFETIES_ON 1
38 #include <sol/sol.hpp>
39 #endif
40 
41 #include "cbTable.hpp"
42 #include "cbOperator.hpp"
43 
44 void bindAllFuncByDefault(sol::state* handle);
45 
46 class luaJitThread {
47  public:
48  ~luaJitThread();
49  luaJitThread();
50 
51  void execMain(const std::string& script);
52 
53  sol::state& operator()();
54 
55  private:
56  sol::state* m_luaHandle;
57 };
58 
59 #endif
luaJitThread::operator()
sol::state & operator()()
Definition: luaEngine.cpp:100
luaJitThread::luaJitThread
luaJitThread()
Definition: luaEngine.cpp:93
luaJitThread
Definition: luaEngine.hpp:46
cbTable.hpp
the virtual table and shared table.
luaJitThread::m_luaHandle
sol::state * m_luaHandle
Definition: luaEngine.hpp:56
bindAllFuncByDefault
void bindAllFuncByDefault(sol::state *handle)
_WIN32
Definition: luaEngine.cpp:13
luaJitThread::execMain
void execMain(const std::string &script)
Definition: luaEngine.cpp:98
cbOperator.hpp
The operator of compute graph.
luaJitThread::~luaJitThread
~luaJitThread()
Definition: luaEngine.cpp:87