diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 6ef0470..e21ec0f 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/EgtMachKernel.vcxproj b/EgtMachKernel.vcxproj index cb0e958..5f38eb6 100644 --- a/EgtMachKernel.vcxproj +++ b/EgtMachKernel.vcxproj @@ -232,6 +232,7 @@ copy $(TargetPath) \EgtProg\Dll64 + diff --git a/EgtMachKernel.vcxproj.filters b/EgtMachKernel.vcxproj.filters index 2dd0d06..3b4ecdf 100644 --- a/EgtMachKernel.vcxproj.filters +++ b/EgtMachKernel.vcxproj.filters @@ -201,6 +201,9 @@ Source Files\Operations + + Source Files\Machine + diff --git a/MachMgr.h b/MachMgr.h index a2b7d76..cea3dd9 100644 --- a/MachMgr.h +++ b/MachMgr.h @@ -296,6 +296,7 @@ class MachMgr : public IMachMgr bool ResetAxisPos( const std::string& sAxis) override ; bool ResetAllAxesPos( void) override ; bool GetAllHeadsNames( STRVECTOR& vNames) const override ; + bool GetAllTablesNames( STRVECTOR& vNames) const override ; bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) override ; bool GetLoadedTool( const std::string& sHead, int nExit, std::string& sTool) const override ; bool UnloadTool( const std::string& sHead, int nExit) override ; diff --git a/MachMgrMachines.cpp b/MachMgrMachines.cpp index 2a1f42f..59d3f34 100644 --- a/MachMgrMachines.cpp +++ b/MachMgrMachines.cpp @@ -428,6 +428,20 @@ MachMgr::GetAllHeadsNames( STRVECTOR& vNames) const return pMch->GetAllHeadsNames( vNames) ; } +//---------------------------------------------------------------------------- +bool +MachMgr::GetAllTablesNames( STRVECTOR& vNames) const +{ + // pulisco il vettore + vNames.clear() ; + // recupero la macchina corrente + Machine* pMch = GetCurrMachine() ; + if ( pMch == nullptr) + return false ; + // richiedo elenco tavole alla macchina + return pMch->GetAllTablesNames( vNames) ; +} + //---------------------------------------------------------------------------- int MachMgr::GetCurrLinAxes( void) const diff --git a/Machine.h b/Machine.h index 5337454..2cde62e 100644 --- a/Machine.h +++ b/Machine.h @@ -53,6 +53,7 @@ class Machine { int nId = GetGroup( sHead) ; return ( IsHeadGroup( nId) ? nId : GDB_ID_NULL) ; } bool GetAllHeadsNames( STRVECTOR& vNames) const ; + bool GetAllTablesNames( STRVECTOR& vNames) const ; int GetHeadExitCount( const std::string& sHead) const ; bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) ; bool GetLoadedTool( const std::string& sHead, int nExit, std::string& sTool) const ; diff --git a/MachineTables.cpp b/MachineTables.cpp new file mode 100644 index 0000000..7dbb8c1 --- /dev/null +++ b/MachineTables.cpp @@ -0,0 +1,40 @@ +//---------------------------------------------------------------------------- +// 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 each ( const auto& snGro in m_mapGroups) { + if ( IsTableGroup( snGro.second)) + vNames.push_back( snGro.first) ; + } + // ordino alfabeticamente + std::sort( vNames.begin(), vNames.end()) ; + return true ; +}