//---------------------------------------------------------------------------- // EgalTech 2015-2018 //---------------------------------------------------------------------------- // File : MachMgrGeneration.cpp Data : 29.05.18 Versione : 1.8e6 // Contenuto : Implementazione gestione generazione della classe MachMgr. // // // // Modifiche : 28.10.15 DS Creazione modulo. // // //---------------------------------------------------------------------------- //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "DllMain.h" #include "MachMgr.h" #include "MachConst.h" #include "Generator.h" #include "Estimator.h" #include "/EgtDev/Include/EGnFileUtils.h" using namespace std ; //---------------------------------------------------------------------------- bool MachMgr::Generate( const string& sCncFile, const string& sInfo) { // se macchina multiprocesso è necessaria stima speciale if ( GetCurrMachine() != nullptr && GetCurrMachine()->GetMultiProcess()) { string sEstFile = ChangeFileExtension( sCncFile, "sest") ; if ( ! Estimate( sEstFile, sInfo)) return false ; } // inizializzazione generatore Generator genPP ; if ( ! genPP.Init( this)) { LOG_ERROR( GetEMkLogger(), "Error on Generate Init") return false ; } // esecuzione della generazione if ( ! genPP.Run( sCncFile, sInfo)) { LOG_ERROR( GetEMkLogger(), "Error on Generate Run") return false ; } return true ; } //---------------------------------------------------------------------------- bool MachMgr::Estimate( const string& sEstFile, const string& sInfo) { // inizializzazione stimatore Estimator estPP ; if ( ! estPP.Init( this)) { LOG_ERROR( GetEMkLogger(), "Error on Estimate Init") return false ; } // esecuzione della stima if ( ! estPP.Run( sEstFile, sInfo)) { LOG_ERROR( GetEMkLogger(), "Error on Estimate Run") return false ; } return true ; }