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