EgtMachKernel 1.6e3 :

- aggiunta prima gestione semplice della macchina.
This commit is contained in:
Dario Sassi
2015-05-07 07:00:23 +00:00
parent ec420de8ef
commit 685966ac11
10 changed files with 213 additions and 14 deletions
+26 -4
View File
@@ -52,30 +52,52 @@ CreateMachMgr( void)
//----------------------------------------------------------------------------
MachMgr::MachMgr( void)
{
m_nContextId = 0 ;
m_pGeomDB = nullptr ;
m_nMachBaseId = GDB_ID_NULL ;
m_nMachAuxId = GDB_ID_NULL ;
m_nCurrMGrpId = GDB_ID_NULL ;
m_nCurrMGeoId = GDB_ID_NULL ;
m_nCurrMch = 0 ;
}
//----------------------------------------------------------------------------
MachMgr::~MachMgr( void)
{
Clear() ;
}
//----------------------------------------------------------------------------
void
MachMgr::Clear( void)
{
// pulisco le macchine
while ( ! m_vMachines.empty()) {
if ( m_vMachines.back() != nullptr)
delete m_vMachines.back() ;
m_vMachines.pop_back() ;
}
}
//----------------------------------------------------------------------------
bool
MachMgr::Init( IGeomDB* pGeomDB, const string& sMachinesDir)
MachMgr::Init( int nContextId, IGeomDB* pGeomDB, const string& sMachinesDir)
{
m_nContextId = nContextId ;
m_pGeomDB = pGeomDB ;
m_sMachinesDir = sMachinesDir ;
m_nMachBaseId = GDB_ID_NULL ;
m_nMachAuxId = GDB_ID_NULL ;
m_nCurrMGrpId = GDB_ID_NULL ;
m_nCurrMGeoId = GDB_ID_NULL ;
return ( m_pGeomDB != nullptr && ExistsDirectory( m_sMachinesDir)) ;
m_nCurrMch = - 1 ;
return ( m_nContextId > 0 && m_pGeomDB != nullptr && ExistsDirectory( m_sMachinesDir)) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::Update( void)
{
// pulizia
Clear() ;
// ricerca del gruppo base per le lavorazioni
m_nMachBaseId = FindMachBase( GDB_ID_ROOT) ;
// imposto gruppo di lavorazione corrente a nessuno