EgtGeomKernel 1.5f5 :
- gestione salvataggio in modalità testo compresso - aggiunto controlli in scritture per salvataggio.
This commit is contained in:
+17
-12
@@ -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) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user