From 11df3f63f64fcfd45002c155aceac082ce8fce53 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 16 Feb 2017 11:30:14 +0000 Subject: [PATCH] EgtMachKernel 1.8b4 : - aggiunta funzione GetMachGroupMachineName. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes MachMgr.h | 1 + MachMgrMachGroups.cpp | 16 ++++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 5e0760e88f2d833bbfe2311e85ad1d36f39d591c..3e700b7532837ed375cf846fb57d34d0333cf517 100644 GIT binary patch delta 97 zcmewt{V#gMFE&P#&A-`fnHfzcKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUI`BbWdH delta 97 zcmewt{V#gMFE&Qw&A-`fnHh~IKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUD-Bai?9 diff --git a/MachMgr.h b/MachMgr.h index e8ba2a8..4ff70ab 100644 --- a/MachMgr.h +++ b/MachMgr.h @@ -84,6 +84,7 @@ class MachMgr : public IMachMgr int AddMachGroup( const std::string& sName, const std::string& sMachineName) override ; bool RemoveMachGroup( int nId) override ; std::string GetMachGroupName( int nId) const override ; + std::string GetMachGroupMachineName( int nId) const override ; int GetMachGroupId( const std::string& sName) const override ; bool SetCurrMachGroup( int nId) override ; bool ResetCurrMachGroup( void) override ; diff --git a/MachMgrMachGroups.cpp b/MachMgrMachGroups.cpp index 9875dce..eb04944 100644 --- a/MachMgrMachGroups.cpp +++ b/MachMgrMachGroups.cpp @@ -241,6 +241,22 @@ MachMgr::GetMachGroupName( int nId) const return sName ; } +//---------------------------------------------------------------------------- +string +MachMgr::GetMachGroupMachineName( int nId) const +{ + // verifica del gruppo base per le lavorazioni + if ( ! VerifyMachBase()) + return "" ; + // verifico che il gruppo ricevuto sia corretto + if ( m_pGeomDB->GetParentId( nId) != m_nMachBaseId) + return "" ; + // recupero il nome della macchina del gruppo riferito + string sName ; + m_pGeomDB->GetInfo( nId, MACH_MACHINE_KEY, sName) ; + return sName ; +} + //---------------------------------------------------------------------------- int MachMgr::GetMachGroupId( const string& sName) const