diff --git a/EGkGdbConst.h b/EGkGdbConst.h index cf8ae7d..aecf09e 100644 --- a/EGkGdbConst.h +++ b/EGkGdbConst.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2013 +// EgalTech 2013-2014 //---------------------------------------------------------------------------- -// File : EgkGdbConst.h Data : 04.12.13 Versione : 1.4a3 +// File : EgkGdbConst.h Data : 17.06.14 Versione : 1.5f5 // Contenuto : Costanti generali per DB geometrico. // // @@ -21,6 +21,11 @@ const int GDB_BEFORE = -1 ; const int GDB_SON = 0 ; const int GDB_AFTER = +1 ; +//----------------- Costanti tipo salvataggio del DB geometrico ---------------- +enum GdbSave { GDB_SV_TXT = 0, + GDB_SV_BIN = 1, + GDB_SV_CMPTXT = 2} ; + //----------------- Costanti tipo oggetti del DB geometrico -------------------- enum GdbType { GDB_TY_NONE = 0, GDB_TY_GEO = 1, diff --git a/EGkGeomDB.h b/EGkGeomDB.h index f3108f8..df19d64 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -38,7 +38,7 @@ class __declspec( novtable) IGeomDB virtual bool Init( void) = 0 ; virtual bool Clear( void) = 0 ; virtual bool Load( const std::string& sFileIn) = 0 ; - virtual bool Save( const std::string& sFileOut, bool bBinary = true) const = 0 ; + virtual bool Save( const std::string& sFileOut, int nFlag = GDB_SV_BIN) const = 0 ; virtual bool ExistsObj( int nId) const = 0 ; virtual int AddGroup( int nId, int nParentId, const Frame3d& frFrame) = 0 ; virtual int InsertGroup( int nId, int nRefId, int nSonBeforeAfter, const Frame3d& frFrame) = 0 ; diff --git a/EGnScan.h b/EGnScan.h index bd34137..5cb42a2 100644 --- a/EGnScan.h +++ b/EGnScan.h @@ -14,7 +14,8 @@ #pragma once #include -#include + +struct gzFile_s ; //----------------------- Macro per import/export ----------------------------- #undef EGN_EXPORT @@ -29,7 +30,7 @@ class Scanner { public : EGN_EXPORT Scanner( void) - : m_bSkipEmptyLine( true), m_nLineNbr( 0), m_bUnget( false), m_nDeltaLineUnget(0) {} + : m_InFile( nullptr), m_bSkipEmptyLine( true), m_nLineNbr( 0), m_bUnget( false), m_nDeltaLineUnget(0) {} EGN_EXPORT ~Scanner( void) { Terminate() ; } EGN_EXPORT bool Init( const std::string& sCmdFile, @@ -43,7 +44,7 @@ class Scanner { return m_sFName ; } private : - std::ifstream m_InFile ; + gzFile_s* m_InFile ; std::string m_sFName ; bool m_bFindRem ; std::string m_sRemInit ;