EgtGeomKernel 1.5f5 :

- gestione salvataggio in modalità testo compresso
- aggiunto controlli in scritture per salvataggio.
This commit is contained in:
Dario Sassi
2014-06-18 07:27:03 +00:00
parent 26c2ad702a
commit 4097bcd178
23 changed files with 359 additions and 261 deletions
+17 -12
View File
@@ -194,11 +194,11 @@ GeomDB::LoadOneObj( NgeReader& ngeIn, bool& bEnd)
//----------------------------------------------------------------------------
bool
GeomDB::Save( const std::string& sFileOut, bool bBinary) const
GeomDB::Save( const std::string& sFileOut, int nFlag) const
{
// apertura file
NgeWriter ngeOut ;
if ( ! ngeOut.Init( sFileOut, bBinary)) {
if ( ! ngeOut.Init( sFileOut, nFlag)) {
LOG_ERROR( GetEGkLogger(), "GeomDbSave : Error on Init ")
return false ;
}
@@ -242,17 +242,24 @@ bool
GeomDB::SaveHeader( NgeWriter& ngeOut) const
{
// intestazione
ngeOut.WriteKey( NGE_START) ;
ngeOut.WriteString( NGE_GEOMDB, ",") ;
ngeOut.WriteInt( NGE_MAJOR_VER, ".") ;
ngeOut.WriteInt( NGE_MINOR_VER, ".") ;
ngeOut.WriteInt( NGE_PATCH_VER, ";", true) ;
if ( ! ngeOut.WriteKey( NGE_START))
return false ;
if ( ! ngeOut.WriteString( NGE_GEOMDB, ","))
return false ;
if ( ! ngeOut.WriteInt( NGE_MAJOR_VER, "."))
return false ;
if ( ! ngeOut.WriteInt( NGE_MINOR_VER, "."))
return false ;
if ( ! ngeOut.WriteInt( NGE_PATCH_VER, ";", true))
return false ;
// materiale di default come colore
Color colDef( 0, 0, 0, 0) ;
GetDefaultMaterial( colDef) ;
ngeOut.WriteKey( NGE_MAT_DEF) ;
ngeOut.WriteCol( colDef, ";", true) ;
if ( ! ngeOut.WriteKey( NGE_MAT_DEF))
return false ;
if ( ! ngeOut.WriteCol( colDef, ";", true))
return false ;
return true ;
}
@@ -262,9 +269,7 @@ bool
GeomDB::SaveFooter( NgeWriter& ngeOut) const
{
// terminazione
ngeOut.WriteKey( NGE_END) ;
return true ;
return ngeOut.WriteKey( NGE_END) ;
}
//----------------------------------------------------------------------------