EgtExecutor 1.8f2 :
- aggiunte ExeLuaSetGlobVectorVar, ExeLuaSetGlobPointVar, ExeLuaGetGlobVectorVar, ExeLuaGetGlobPointVar.
This commit is contained in:
+56
-1
@@ -18,7 +18,8 @@
|
||||
#include "AuxTools.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeCmdLogOff.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -95,6 +96,38 @@ ExeLuaSetGlobStringVar( const string& sVar, const string& sVal)
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaSetGlobVectorVar( const string& sVar, const Vector3d& vtVal)
|
||||
{
|
||||
// assegno il valore della variabile
|
||||
bool bOk = LuaSetGlobVar( sVar, vtVal) ;
|
||||
// se richiesto, salvo il comando Lua
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = sVar + "='" + ToString( vtVal) + "'" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaSetGlobPointVar( const string& sVar, const Point3d& ptVal)
|
||||
{
|
||||
// assegno il valore della variabile
|
||||
bool bOk = LuaSetGlobVar( sVar, ptVal) ;
|
||||
// se richiesto, salvo il comando Lua
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = sVar + "='" + ToString( ptVal) + "'" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaGetGlobBoolVar( const string& sVar, bool* pbVal)
|
||||
@@ -139,6 +172,28 @@ ExeLuaGetGlobStringVar( const string& sVar, string& sVal)
|
||||
return LuaGetGlobVar( sVar, sVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaGetGlobVectorVar( const string& sVar, Vector3d& vtVal)
|
||||
{
|
||||
// verifico parametro di ritorno
|
||||
if ( &vtVal == nullptr)
|
||||
return false ;
|
||||
// recupero il valore della variabile
|
||||
return LuaGetGlobVar( sVar, vtVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaGetGlobPointVar( const string& sVar, Point3d& ptVal)
|
||||
{
|
||||
// verifico parametro di ritorno
|
||||
if ( &ptVal == nullptr)
|
||||
return false ;
|
||||
// recupero il valore della variabile
|
||||
return LuaGetGlobVar( sVar, ptVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeLuaResetGlobVar( const string& sVar)
|
||||
|
||||
Reference in New Issue
Block a user