Include :
- aggiunto EgtUUID e Writer - Scan diventato Scanner.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2014
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgnScanner.h Data : 06.03.14 Versione : 1.5c1
|
||||
// Contenuto : Dichiarazione della classe CScan.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 20.11.13 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct gzFile_s ;
|
||||
|
||||
//----------------------- Macro per import/export -----------------------------
|
||||
#undef EGN_EXPORT
|
||||
#if defined( I_AM_EGN) // da definirsi solo nella DLL
|
||||
#define EGN_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGN_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class Scanner
|
||||
{
|
||||
public :
|
||||
EGN_EXPORT Scanner( void)
|
||||
: 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& sFile,
|
||||
const char* szRemInit = "//", bool bSkipEmptyLine = true) ;
|
||||
EGN_EXPORT bool Terminate( void) ;
|
||||
EGN_EXPORT bool GetLine( std::string& sLine) ;
|
||||
EGN_EXPORT bool UngetLine( std::string& sLine) ;
|
||||
EGN_EXPORT int GetCurrLineNbr( void)
|
||||
{ return m_nLineNbr ; }
|
||||
EGN_EXPORT const std::string& GetFilePath( void)
|
||||
{ return m_sFName ; }
|
||||
|
||||
private :
|
||||
gzFile_s* m_InFile ;
|
||||
std::string m_sFName ;
|
||||
bool m_bFindRem ;
|
||||
std::string m_sRemInit ;
|
||||
bool m_bSkipEmptyLine ;
|
||||
int m_nLineNbr ;
|
||||
bool m_bUnget ;
|
||||
std::string m_sUnget ;
|
||||
int m_nDeltaLineUnget ;
|
||||
} ;
|
||||
Reference in New Issue
Block a user