EgtInterface 1.5i5 :

- aggiunto interprete Lua
- portate in interfaccia API molte funzioni di base.
This commit is contained in:
Dario Sassi
2014-10-07 07:04:28 +00:00
parent 6735c79753
commit 50b2d271ac
31 changed files with 5816 additions and 42 deletions
+59
View File
@@ -0,0 +1,59 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : API_LUA.cpp Data : 28.09.14 Versione : 1.5i5
// Contenuto : Funzioni esecuzione LUA per API.
//
//
//
// Modifiche : 28.09.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "API.h"
#include "LUA.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EGnStringConverter.h"
using namespace std ;
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtLuaSetContext( int nGseCtx)
{
return ( LuaSetGseContext( nGseCtx) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtLuaExecLine( const wchar_t* wsLine)
{
// eseguo il comando
return ( LuaExecLine( wstrztoA( wsLine)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtLuaExecFile( const wchar_t* wsFilePath)
{
// converto nome file
string sFilePath = wstrztoA( wsFilePath) ;
// emetto info
string sInfo = "Exec File = " + sFilePath ;
LOG_INFO( GetLogger(), sInfo.c_str())
// esecuzione script
return ( LuaExecFile( sFilePath) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtLuaGetLastError( wchar_t*& wsError)
{
wsError = _wcsdup( stringtoW( LuaGetLastError())) ;
return (( wsError == nullptr) ? FALSE : TRUE) ;
}