Files
EgtGeomKernel/NgeWriter.h
T
Dario Sassi 46fb7bd5f4 EgtGeomKernel 1.5i4 :
- tolto controllo antidebug da release per VB.NET
- aggiunti metodi CurveArc::Set2PNRS e SetC2PN
- aggiunta scrittura MachineId come commento in NGE di testo.
2014-09-18 14:56:47 +00:00

53 lines
2.2 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : NgeWriter.h Data : 12.04.14 Versione : 1.5d5
// 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"
#include <fstream>
struct gzFile_s ;
//----------------------------------------------------------------------------
class NgeWriter
{
public :
NgeWriter( void) : m_bBinary( false), m_OutTxtFile( 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 ;
// per file binari
std::ofstream m_OutBinFile ;
// per file ASCII
gzFile_s* m_OutTxtFile ;
} ;