d682572702
- modifiche per bloccaggi su più fasi
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2016-2016
|
|
//----------------------------------------------------------------------------
|
|
// File : SetTempPhase.h Data : 14.10.16 Versione : 1.6v7
|
|
// Contenuto : Dichiarazione classe per impostazione temporanea
|
|
// della fase corrente.
|
|
//
|
|
//
|
|
// Modifiche : 14.10.16 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "MachMgr.h"
|
|
|
|
//----------------------------------------------------------------------------
|
|
class SetTempPhase
|
|
{
|
|
public :
|
|
SetTempPhase( MachMgr* pMachMgr, int nPhase)
|
|
{ m_pMachMgr = pMachMgr ;
|
|
if ( m_pMachMgr != nullptr) {
|
|
m_nPrevPhase = m_pMachMgr->GetCurrPhase() ;
|
|
m_pMachMgr->SetCurrPhase( nPhase) ;
|
|
} }
|
|
~SetTempPhase( void)
|
|
{ Reset() ; }
|
|
void Reset( void)
|
|
{ if ( m_pMachMgr != nullptr)
|
|
m_pMachMgr->SetCurrPhase( m_nPrevPhase) ; }
|
|
|
|
private :
|
|
int m_nPrevPhase ;
|
|
MachMgr* m_pMachMgr ;
|
|
} ;
|