EgtMachKernel 2.4h2 :
- aggiunta gestione più direttori di base per le macchine (in MachMgr::Init sono tutti nella stessa stringa separati da "|") - aggiunta funzione GetMachines di MachMgr per restituire elenco nome/direttorio di tutte le macchine trovate - sistemazioni varie per le modifiche sopra indicate.
This commit is contained in:
+14
-2
@@ -94,7 +94,19 @@ MachMgr::Init( const string& sMachinesDir, const string& sToolMakersDir, IGeomDB
|
||||
{
|
||||
m_nContextId = nContextId ;
|
||||
m_pGeomDB = pGeomDB ;
|
||||
m_sMachinesDir = sMachinesDir ;
|
||||
STRVECTOR vsDir ;
|
||||
Tokenize( sMachinesDir, "|", vsDir) ;
|
||||
for ( int i = 0 ; i < int( vsDir.size()) ; ++ i) {
|
||||
string sDir = vsDir[i] ;
|
||||
TrimRight( sDir, " \\") ;
|
||||
if ( ExistsDirectory( vsDir[i]) &&
|
||||
find_if( m_vMachinesBaseDir.begin(), m_vMachinesBaseDir.end(),
|
||||
[ sDir]( const string& sItem)
|
||||
{ return ( EqualNoCase( sDir, sItem)) ; }) == m_vMachinesBaseDir.end()) {
|
||||
m_vMachinesBaseDir.emplace_back( sDir) ;
|
||||
}
|
||||
}
|
||||
|
||||
m_sToolMakersDir = sToolMakersDir ;
|
||||
m_sLuaLibsDir = sLuaLibsDir ;
|
||||
m_sLuaLastRequire = sLuaLastRequire ;
|
||||
@@ -103,7 +115,7 @@ MachMgr::Init( const string& sMachinesDir, const string& sToolMakersDir, IGeomDB
|
||||
m_nCurrMGrpId = GDB_ID_NULL ;
|
||||
m_nCurrMch = - 1 ;
|
||||
m_stuMgr.Reset() ;
|
||||
return ( m_nContextId > 0 && m_pGeomDB != nullptr && ExistsDirectory( m_sMachinesDir)) ;
|
||||
return ( m_nContextId > 0 && m_pGeomDB != nullptr && ! m_vMachinesBaseDir.empty()) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user