EgtMachKernel 1.8g4 :

- aggiunte funzioni GetLastMachGroup e GetPrevMachGroup.
This commit is contained in:
Dario Sassi
2017-07-18 07:18:45 +00:00
parent 0df9060363
commit 6a06ca7290
3 changed files with 29 additions and 0 deletions
BIN
View File
Binary file not shown.
+2
View File
@@ -81,6 +81,8 @@ class MachMgr : public IMachMgr
int GetMachGroupCount( void) const override ;
int GetFirstMachGroup( void) const override ;
int GetNextMachGroup( int nId) const override ;
int GetLastMachGroup( void) const override ;
int GetPrevMachGroup( int nId) const override ;
bool GetMachGroupNewName( std::string& sName) const override ;
int AddMachGroup( const std::string& sName, const std::string& sMachineName) override ;
bool RemoveMachGroup( int nId) override ;
+27
View File
@@ -61,6 +61,33 @@ MachMgr::GetNextMachGroup( int nId) const
return nNextId ;
}
//----------------------------------------------------------------------------
int
MachMgr::GetLastMachGroup( void) const
{
// verifica del gruppo base per le lavorazioni
if ( ! VerifyMachBase())
return GDB_ID_NULL ;
// recupero l'ultimo sottogruppo
int nId = m_pGeomDB->GetLastGroupInGroup( m_nMachBaseId) ;
return nId ;
}
//----------------------------------------------------------------------------
int
MachMgr::GetPrevMachGroup( int nId) const
{
// verifica del gruppo base per le lavorazioni
if ( ! VerifyMachBase())
return GDB_ID_NULL ;
// verifico che il gruppo ricevuto sia corretto
if ( m_pGeomDB->GetParentId( nId) != m_nMachBaseId)
return GDB_ID_NULL ;
// recupero il precedente sottogruppo
int nNextId = m_pGeomDB->GetPrevGroup( nId) ;
return nNextId ;
}
//----------------------------------------------------------------------------
bool
MachMgr::GetMachGroupNewName( string& sName) const