EgtGeomKernel : Modifiche per Scanner e Load/Save di GeomDB con nome file.

This commit is contained in:
Dario Sassi
2013-12-12 09:11:29 +00:00
parent a3308d8e23
commit fb0ca2906f
23 changed files with 50 additions and 78 deletions
+2 -40
View File
@@ -57,44 +57,6 @@ GdbExecutor::Init( IGeomDB* pGdb, ILogger* pLogger)
return ( m_pGDB != nullptr) ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::Load( const string& sFile)
{
bool bOk ;
ifstream ifLoad ;
ifLoad.open( stringtoW( sFile)) ;
if ( ifLoad.good()) {
bOk = m_pGDB->Load( ifLoad) ;
ifLoad.close() ;
}
else
bOk = false ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::Save( const string& sFile)
{
bool bOk ;
ofstream ofSave ;
ofSave.open( stringtoW( sFile)) ;
if ( ofSave.good()) {
bOk = m_pGDB->Save( ofSave) ;
ofSave.close() ;
}
else
bOk = false ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR& vsParams)
@@ -847,7 +809,7 @@ GdbExecutor::ExecuteLoad( const STRVECTOR& vsParams)
m_pGDB->Clear() ;
m_pGDB->ReInit() ;
// esecuzione caricamento
return Load( vsParams[0]) ;
return m_pGDB->Load( vsParams[0]) ;
}
//----------------------------------------------------------------------------
@@ -858,7 +820,7 @@ GdbExecutor::ExecuteSave( const STRVECTOR& vsParams)
if ( vsParams.size() != 1)
return false ;
// esecuzione salvataggio
return Save( vsParams[0]) ;
return m_pGDB->Save( vsParams[0]) ;
}
//----------------------------------------------------------------------------