EgtGeomKernel 1.5d5 :
- aggiunta scrittura binaria - tolte GetKey, Load e Save da interfaccia IGeoObj.
This commit is contained in:
+11
-10
@@ -15,8 +15,9 @@
|
||||
#include "stdafx.h"
|
||||
#include "GdbGroup.h"
|
||||
#include "IdManager.h"
|
||||
#include "NgeWriter.h"
|
||||
#include "/EgtDev/Include/EGkGdbFunct.h"
|
||||
#include "\EgtDev\Include\EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -101,28 +102,28 @@ GdbGroup::Clone( int nId, IdManager& IdMgr) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbGroup::Save( std::ostream& osOut) const
|
||||
GdbGroup::Save( NgeWriter& ngeOut) const
|
||||
{
|
||||
bool bOk = true ;
|
||||
|
||||
// tipo entità
|
||||
osOut << GetKey() << endl ;
|
||||
// identificativi
|
||||
osOut << m_nId << "@" << GetParentId() << endl ;
|
||||
// tipo entità e identificativi
|
||||
ngeOut.WriteKey( NGE_A_GRP, true) ;
|
||||
ngeOut.WriteInt( m_nId, "@") ;
|
||||
ngeOut.WriteInt( GetParentId(), nullptr, true) ;
|
||||
|
||||
// attributi
|
||||
if ( ! GdbObj::SaveAttribs( osOut))
|
||||
if ( ! GdbObj::SaveAttribs( ngeOut))
|
||||
bOk = false ;
|
||||
|
||||
// dati del riferimento
|
||||
osOut << "G" << endl ;
|
||||
if ( ! m_gfrFrame.Save( osOut))
|
||||
ngeOut.WriteKey( NGE_G, true) ;
|
||||
if ( ! m_gfrFrame.Save( ngeOut))
|
||||
bOk = false ;
|
||||
|
||||
// salvataggio dei figli
|
||||
const GdbObj* pGdbObj = GetFirstObj() ;
|
||||
while ( pGdbObj != nullptr) {
|
||||
if ( ! pGdbObj->Save( osOut))
|
||||
if ( ! pGdbObj->Save( ngeOut))
|
||||
bOk = false ;
|
||||
pGdbObj = pGdbObj->GetNext() ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user