Files
EgtGeomKernel/NgeWriter.h
T
Dario Sassi d92344f2bb EgtGeomKernel :
- - modifiche a NgeReader per semplificare e velocizzare lettura file binari.
2025-12-29 11:55:09 +01:00

49 lines
2.0 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2025
//----------------------------------------------------------------------------
// File : NgeWriter.h Data : 29.12.25 Versione : 2.7l6
// Contenuto : Dichiarazione della classe NgeWriter.
//
//
//
// Modifiche : 12.04.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "NgeConst.h"
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkColor.h"
struct gzFile_s ;
//----------------------------------------------------------------------------
class NgeWriter
{
public :
NgeWriter( void) : m_bBinary( false), m_OutFile( nullptr) {}
~NgeWriter( void)
{ Close() ; }
bool Init( const std::string& sFileOut, int nFlag) ;
bool Close( void) ;
bool WriteUchar( unsigned char ucVal, const char* szSep, bool bEndL = false) ;
bool WriteBool( bool bVal, const char* szSep, bool bEndL = false) ;
bool WriteInt( int nVal, const char* szSep, bool bEndL = false) ;
bool WriteDouble( double dVal, const char* szSep, bool bEndL = false, int nPrec = 6) ;
bool WriteVector( const Vector3d& vtV, const char* szSep, bool bEndL = false, int nPrec = 9) ;
bool WritePoint( const Point3d& ptP, const char* szSep, bool bEndL = false, int nPrec = 6) ;
bool WritePointW( const Point3d& ptP, double dW, const char* szSep, bool bEndL = false,
int nPrecP = 6, int nPrecW = 9) ;
bool WriteFrame( const Frame3d& frF, const char* szSep, bool bEndL, int nPrecP = 6, int nPrecV = 9) ;
bool WriteString( const std::string& sVal, const char* szSep, bool bEndL = false) ;
bool WriteKey( int nKey /* bEndL = true*/) ;
bool WriteCol( const Color& cCol, const char* szSep, bool bEndL = false) ;
bool WriteRemark( const std::string& sVal /* bEndL = true*/) ;
private :
bool m_bBinary ;
gzFile_s* m_OutFile ;
} ;