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