EgtExecutor :
- aggiunta in Exe e Lua GetMachGroupNewName.
This commit is contained in:
@@ -120,6 +120,16 @@ ExeGetNextMachGroup( int nId)
|
||||
return pMachMgr->GetNextMachGroup( nId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetMachGroupNewName( string& sName)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero un nuovo nome a partire da quello passato
|
||||
return pGseCtx->m_pMachMgr->GetMachGroupNewName( sName) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeAddMachGroup( const string& sName, const string& sMachineName)
|
||||
|
||||
@@ -105,6 +105,23 @@ LuaGetNextMachGroup( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetMachGroupNewName( lua_State* L)
|
||||
{
|
||||
// 1 parametro : sName
|
||||
string sName ;
|
||||
LuaCheckParam( L, 1, sName)
|
||||
LuaClearStack( L) ;
|
||||
// verifico nome e se necessario lo modifico per renderlo nuovo
|
||||
bool bOk = ExeGetMachGroupNewName( sName) ;
|
||||
if ( bOk)
|
||||
LuaSetParam( L, sName) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddMachGroup( lua_State* L)
|
||||
@@ -2651,6 +2668,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupCount", LuaGetMachGroupCount) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstMachGroup", LuaGetFirstMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextMachGroup", LuaGetNextMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupNewName", LuaGetMachGroupNewName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddMachGroup", LuaAddMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveMachGroup", LuaRemoveMachGroup) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachGroupName", LuaGetMachGroupName) ;
|
||||
|
||||
Reference in New Issue
Block a user