41c09abe37
- modifiche varie per OmagCut.
68 lines
2.1 KiB
C++
68 lines
2.1 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : MachMgrTools.cpp Data : 17.09.15 Versione : 1.6i7
|
|
// Contenuto : Implementazione gestione utensili della classe MachMgr.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 17.09.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "DllMain.h"
|
|
#include "MachMgr.h"
|
|
|
|
using namespace std ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
const ToolData*
|
|
MachMgr::GetToolData( const string& sName) const
|
|
{
|
|
// recupero il gestore di utensili della macchina corrente
|
|
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
|
|
if ( pTsMgr == nullptr)
|
|
return nullptr ;
|
|
// recupero l'utensile
|
|
return pTsMgr->GetTool( sName) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
bool
|
|
MachMgr::GetToolParam( const string& sName, int nType, int& nVal) const
|
|
{
|
|
// recupero l'utensile
|
|
const ToolData* pTdata = GetToolData( sName) ;
|
|
if ( pTdata == nullptr)
|
|
return false ;
|
|
// recupero il parametro
|
|
return pTdata->GetParam( nType, nVal) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
bool
|
|
MachMgr::GetToolParam( const string& sName, int nType, double& dVal) const
|
|
{
|
|
// recupero l'utensile
|
|
const ToolData* pTdata = GetToolData( sName) ;
|
|
if ( pTdata == nullptr)
|
|
return false ;
|
|
// recupero il parametro
|
|
return pTdata->GetParam( nType, dVal) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
bool
|
|
MachMgr::GetToolParam( const string& sName, int nType, string& sVal) const
|
|
{
|
|
// recupero l'utensile
|
|
const ToolData* pTdata = GetToolData( sName) ;
|
|
if ( pTdata == nullptr)
|
|
return false ;
|
|
// recupero il parametro
|
|
return pTdata->GetParam( nType, sVal) ;
|
|
}
|