[ref]同步711
This commit is contained in:
parent
3068cba07f
commit
2f0cba37f1
@ -24,22 +24,9 @@ bool CCalcLua::initialize()
|
|||||||
m_error = "错误:初始化lua环境失败!";
|
m_error = "错误:初始化lua环境失败!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
luabridge::getGlobalNamespace(lua_state)
|
|
||||||
.beginNamespace ("kbd")
|
registFunctionToLua();
|
||||||
.addFunction ("getDataByIndex",&CCalcLua::getDataByIndex)
|
|
||||||
.endNamespace ();
|
|
||||||
luabridge::getGlobalNamespace(lua_state)
|
|
||||||
.beginNamespace ("kbd")
|
|
||||||
.addFunction ("getInParamNum",&CCalcLua::getInParamNum)
|
|
||||||
.endNamespace ();
|
|
||||||
luabridge::getGlobalNamespace(lua_state)
|
|
||||||
.beginNamespace ("kbd")
|
|
||||||
.addFunction ("getBitAnd",&CCalcLua::getBitAnd)
|
|
||||||
.endNamespace ();
|
|
||||||
luabridge::getGlobalNamespace(lua_state)
|
|
||||||
.beginNamespace ("kbd")
|
|
||||||
.addFunction ("getBitOr",&CCalcLua::getBitOr)
|
|
||||||
.endNamespace ();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,3 +204,22 @@ bool CCalcLua::release()
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCalcLua::registFunctionToLua()
|
||||||
|
{
|
||||||
|
luabridge::getGlobalNamespace(lua_state)
|
||||||
|
.beginNamespace ("kbd")
|
||||||
|
.addFunction ("getDataByIndex",&CCalcLua::getDataByIndex)
|
||||||
|
.addFunction ("getInParamNum",&CCalcLua::getInParamNum)
|
||||||
|
.addFunction ("getBitAnd",&CCalcLua::getBitAnd)
|
||||||
|
.addFunction ("getBitOr",&CCalcLua::getBitOr)
|
||||||
|
.endNamespace ();
|
||||||
|
|
||||||
|
luabridge::getGlobalNamespace(lua_state)
|
||||||
|
.beginNamespace ("iot")
|
||||||
|
.addFunction ("getDataByIndex",&CCalcLua::getDataByIndex)
|
||||||
|
.addFunction ("getInParamNum",&CCalcLua::getInParamNum)
|
||||||
|
.addFunction ("getBitAnd",&CCalcLua::getBitAnd)
|
||||||
|
.addFunction ("getBitOr",&CCalcLua::getBitOr)
|
||||||
|
.endNamespace ();
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,18 @@
|
|||||||
|
|
||||||
#include "CCommonConfigParse.h"
|
#include "CCommonConfigParse.h"
|
||||||
|
|
||||||
|
//< 屏蔽xml_parser编译告警
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "boost/property_tree/xml_parser.hpp"
|
#include "boost/property_tree/xml_parser.hpp"
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "boost/typeof/typeof.hpp"
|
#include "boost/typeof/typeof.hpp"
|
||||||
#include "boost/filesystem.hpp"
|
#include "boost/filesystem.hpp"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user