Files
EgtMachKernel/MachineTables.cpp
T
Dario Sassi b9303acc5d EgtMachKernel 1.9k2 :
- aggiunta gestione massimo affondamento di utensile TdbGetCurrToolMaxDepth
- for each (.. in ..) sostituito da for ( .. : ..) vero costrutto C++.
2018-11-28 17:11:39 +00:00

54 lines
1.6 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2017-2017
//----------------------------------------------------------------------------
// File : MachineTables.cpp Data : 09.03.15 Versione : 1.8c4
// Contenuto : Implementazione gestione macchina : funzioni per tavole.
//
//
//
// Modifiche : 09.03.17 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "MachMgr.h"
#include "DllMain.h"
#include "Head.h"
#include "Exit.h"
#include "/EgtDev/Include/EMkToolConst.h"
#include "/EgtDev/Include/EGnStringUtils.h"
#include "/EgtDev/Include/EGnFileUtils.h"
using namespace std ;
//----------------------------------------------------------------------------
bool
Machine::GetAllTablesNames( STRVECTOR& vNames) const
{
// reset lista nomi
vNames.clear() ;
// ricerca delle tavole
for ( const auto& snGro : m_mapGroups) {
if ( IsTableGroup( snGro.second))
vNames.push_back( snGro.first) ;
}
// ordino alfabeticamente
std::sort( vNames.begin(), vNames.end()) ;
return true ;
}
//----------------------------------------------------------------------------
int
Machine::GetFirstTable( void) const
{
// ricerca della prima tavola
for ( const auto& snGro : m_mapGroups) {
if ( IsTableGroup( snGro.second))
return snGro.second ;
}
// non trovata alcuna tavola
return GDB_ID_NULL ;
}