EgtExecutor 1.8b5 :
- aggiunta in Exe e Lua funzione GetMachGroupMachineName.
This commit is contained in:
@@ -212,6 +212,17 @@ ExeGetMachGroupName( int nId, string& sName)
|
||||
return ( ! sName.empty()) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetMachGroupMachineName( int nId, string& sMachineName)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// recupero il nome della macchina usata nella macchinata
|
||||
sMachineName = pMachMgr->GetMachGroupMachineName( nId) ;
|
||||
return ( ! sMachineName.empty()) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetMachGroupId( const string& sName)
|
||||
|
||||
Binary file not shown.
@@ -210,6 +210,25 @@ LuaGetMachGroupName( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetMachGroupMachineName( lua_State* L)
|
||||
{
|
||||
// 1 parametro : identificativo del gruppo
|
||||
int nMGroupInd ;
|
||||
LuaCheckParam( L, 1, nMGroupInd)
|
||||
LuaClearStack( L) ;
|
||||
// recupero il nome della macchinata
|
||||
string sMachineName ;
|
||||
bool bOk = ExeGetMachGroupMachineName( nMGroupInd, sMachineName) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, sMachineName) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetMachGroupId( lua_State* L)
|
||||
@@ -3030,6 +3049,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddMachGroup", LuaAddMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveMachGroup", LuaRemoveMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupName", LuaGetMachGroupName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupMachineName", LuaGetMachGroupMachineName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupId", LuaGetMachGroupId) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCurrMachGroup", LuaSetCurrMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtResetCurrMachGroup", LuaResetCurrMachGroup) ;
|
||||
|
||||
Reference in New Issue
Block a user