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
+14 -11
View File
@@ -105,34 +105,37 @@ GdbGroup::Clone( int nId, IdManager& IdMgr) const
bool
GdbGroup::Save( NgeWriter& ngeOut) const
{
bool bOk = true ;
// tipo entità e identificativi
ngeOut.WriteKey( NGE_A_GRP) ;
ngeOut.WriteInt( m_nId, "@") ;
ngeOut.WriteInt( GetParentId(), nullptr, true) ;
if ( ! ngeOut.WriteKey( NGE_A_GRP))
return false ;
if ( ! ngeOut.WriteInt( m_nId, "@"))
return false ;
if ( ! ngeOut.WriteInt( GetParentId(), nullptr, true))
return false ;
// attributi
if ( ! GdbObj::SaveAttribs( ngeOut))
bOk = false ;
return false ;
// dati geometrici
ngeOut.WriteKey( NGE_G) ;
if ( ! ngeOut.WriteKey( NGE_G))
return false ;
// puntatore alla prima copia (per ora NULL)
ngeOut.WriteInt( GDB_ID_NULL, nullptr, true) ;
if ( ! ngeOut.WriteInt( GDB_ID_NULL, nullptr, true))
return false ;
// frame
if ( ! m_gfrFrame.Save( ngeOut))
bOk = false ;
return false ;
// salvataggio dei figli
const GdbObj* pGdbObj = GetFirstObj() ;
while ( pGdbObj != nullptr) {
if ( ! pGdbObj->Save( ngeOut))
bOk = false ;
return false ;
pGdbObj = pGdbObj->GetNext() ;
}
return bOk ;
return true ;
}
//----------------------------------------------------------------------------