EgtInterface 1.6e1 :
- migliorata EgtErase per registrazione lua - migliorata segnalazione stato avvio di EgtMachMgr.
This commit is contained in:
+8
-5
@@ -26,20 +26,23 @@ using namespace std ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtInitMachMgr( void)
|
||||
__stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX( pGseCtx, FALSE)
|
||||
// inizializzazione gestore lavorazioni
|
||||
PtrOwner<IMachMgr> pMachMgr( MyCreateMachMgr()) ;
|
||||
VERIFY_NULL( Get( pMachMgr), "Error in CreateMachMgr", FALSE)
|
||||
pMachMgr->Init( pGseCtx->m_pGeomDB) ;
|
||||
string sMachinesDir = wstrztoA( wsMachinesDir) ;
|
||||
bool bOk = pMachMgr->Init( pGseCtx->m_pGeomDB, sMachinesDir) ;
|
||||
// assegno il gestore al contesto
|
||||
pGseCtx->m_pMachMgr = Release( pMachMgr) ;
|
||||
pGseCtx->m_pMachMgr = ( bOk ? Release( pMachMgr) : nullptr) ;
|
||||
// log avvio Machining Manager
|
||||
string sLog = "MachMgr started " ;
|
||||
string sLog = "MachMgr " ;
|
||||
sLog += ( bOk ? " started" : " error") ;
|
||||
sLog += " (" + sMachinesDir + ")" ;
|
||||
LOG_INFO( GetLogger(), sLog.c_str())
|
||||
return TRUE ;
|
||||
return ( bOk ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user