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
+20 -10
View File
@@ -95,26 +95,36 @@ bool
Attribs::Save( NgeWriter& ngeOut) const
{
// flag presenza attributi
ngeOut.WriteKey( NGE_A) ;
if ( ! ngeOut.WriteKey( NGE_A))
return false ;
// livello
ngeOut.WriteUchar( m_Data[LEVEL], ",") ;
if ( ! ngeOut.WriteUchar( m_Data[LEVEL], ","))
return false ;
// modo
ngeOut.WriteUchar( m_Data[MODE], ",") ;
if ( ! ngeOut.WriteUchar( m_Data[MODE], ","))
return false ;
// stato (se SEL è convertito in ON)
int nStat = (( m_Data[STATUS] > GDB_ST_ON) ? GDB_ST_ON : m_Data[STATUS]) ;
ngeOut.WriteUchar( nStat, ",") ;
if ( ! ngeOut.WriteUchar( nStat, ","))
return false ;
// marcatura (sempre OFF)
ngeOut.WriteUchar( GDB_MK_OFF, ";") ;
if ( ! ngeOut.WriteUchar( GDB_MK_OFF, ";"))
return false ;
// materiale
ngeOut.WriteInt( m_Material, ";") ;
if ( ! ngeOut.WriteInt( m_Material, ";"))
return false ;
// colore
ngeOut.WriteCol( m_Color, ";") ;
if ( ! ngeOut.WriteCol( m_Color, ";"))
return false ;
// numero di stringhe di info (nelle linee successive)
ngeOut.WriteInt( int( m_slInfo.size()), ";", true) ;
if ( ! ngeOut.WriteInt( int( m_slInfo.size()), ";", true))
return false ;
// stringhe di info
STRLIST::const_iterator iIter ;
for ( iIter = m_slInfo.begin() ; iIter != m_slInfo.end() ; ++ iIter)
ngeOut.WriteString( *iIter, nullptr, true) ;
for ( iIter = m_slInfo.begin() ; iIter != m_slInfo.end() ; ++ iIter) {
if ( ! ngeOut.WriteString( *iIter, nullptr, true))
return false ;
}
return true ;
}