diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 05fff16..f0fb4ec 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -1741,13 +1741,23 @@ ExeGetOperationPhase( int nId) return pMachMgr->GetOperationPhase( nId) ; } +//----------------------------------------------------------------------------- +bool +ExeSetOperationName( int nId, const string& sName) +{ + IMachMgr* pMachMgr = GetCurrMachMgr() ; + VERIFY_MACHMGR( pMachMgr, false) + // assegno il nuovo nome alla operazione della macchinata corrente + return pMachMgr->SetOperationName( nId, sName) ; +} + //----------------------------------------------------------------------------- bool ExeGetOperationName( int nId, string& sName) { IMachMgr* pMachMgr = GetCurrMachMgr() ; VERIFY_MACHMGR( pMachMgr, false) - // recupero la fase di appartenenza della operazione della macchinata corrente + // recupero il nome della operazione della macchinata corrente sName = pMachMgr->GetOperationName( nId) ; return ( ! sName.empty()) ; } diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 5a67fb0..63be372 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ diff --git a/LUA_MachMgr.cpp b/LUA_MachMgr.cpp index bf6bcca..924c7b1 100644 --- a/LUA_MachMgr.cpp +++ b/LUA_MachMgr.cpp @@ -1961,6 +1961,23 @@ LuaGetOperationPhase( lua_State* L) return 1 ; } +//------------------------------------------------------------------------------- +static int +LuaSetOperationName( lua_State* L) +{ + // 2 parametri : nId, sName + int nId ; + LuaCheckParam( L, 1, nId) + string sName ; + LuaCheckParam( L, 2, sName) + LuaClearStack( L) ; + // assegno il nuovo nome all'operazione indicata della macchinata corrente + bool bOk = ExeSetOperationName( nId, sName) ; + // restituisco il risultato + LuaSetParam( L, bOk) ; + return 1 ; +} + //------------------------------------------------------------------------------- static int LuaGetOperationName( lua_State* L) @@ -3562,6 +3579,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr) bOk = bOk && luaMgr.RegisterFunction( "EgtGetPrevActiveOperation", LuaGetPrevActiveOperation) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationType", LuaGetOperationType) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationPhase", LuaGetOperationPhase) ; + bOk = bOk && luaMgr.RegisterFunction( "EgtSetOperationName", LuaSetOperationName) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationName", LuaGetOperationName) ; bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationId", LuaGetOperationId) ; bOk = bOk && luaMgr.RegisterFunction( "EgtIsOperationEmpty", LuaIsOperationEmpty) ;