Include :

- aggiornamento prototipo.
This commit is contained in:
Dario Sassi
2020-10-12 09:53:24 +00:00
parent aff94783b3
commit 985d6b52f8
4 changed files with 18 additions and 10 deletions
+6 -4
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2014
// EgalTech 2014-2020
//----------------------------------------------------------------------------
// File : EExExportConst.h Data : 07.08.14 Versione : 1.5h2
// File : EExExportConst.h Data : 12.10.20 Versione : 2.2j3
// Contenuto : Costanti per esportazione.
//
//
//
// Modifiche : 07.08.14 DS Creazione modulo.
//
// 12.10.20 DS aggiunto EEXFLAG_ADV_NAMES e EEXFLAG_DEFAULT.
//
//----------------------------------------------------------------------------
@@ -23,4 +23,6 @@ const int EEXFLT_DEFAULT = EEXFLT_LEVUSER | EEXFLT_MODESTD | EEXFLT_STAON | EEXF
//-----------------------------------------------------------------------------
enum EExFlag { EEXFLAG_NONE = 0x0000,
EEXFLAG_COMP_LAYER = 0x0001,
EEXFLAG_COL_BY_LAYER = 0x0002} ;
EEXFLAG_COL_BY_LAYER = 0x0002,
EEXFLAG_ADV_NAMES = 0x0004} ;
const int EEXFLAG_DEFAULT = EEXFLAG_COMP_LAYER ;
+10 -4
View File
@@ -99,19 +99,25 @@ ValidateFileName( std::string& sName)
//----------------------------------------------------------------------------
inline bool
IsValidDxfName( const std::string& sName)
IsValidDxfName( const std::string& sName, bool bAdvanced)
{
if ( &sName == nullptr || sName.empty())
return false ;
return ( sName.find_first_of( " <>/\\\".:;?*|='", 0) == std::string::npos) ;
std::string sOut = "<>/\\\":;?*|='" ;
if ( ! bAdvanced)
sOut += " ." ;
return ( sName.find_first_of( sOut, 0) == std::string::npos) ;
}
//----------------------------------------------------------------------------
inline bool
ValidateDxfName( std::string& sName)
ValidateDxfName( std::string& sName, bool bAdvanced)
{
std::string sOut = "<>/\\\":;?*|='" ;
if ( ! bAdvanced)
sOut += " ." ;
std::string::size_type i ;
while ( ( i = sName.find_first_of( " <>/\\\".:;?*|='")) != std::string::npos)
while ( ( i = sName.find_first_of( sOut)) != std::string::npos)
sName[i] = '_' ;
return true ;
}
+1 -1
View File
@@ -107,7 +107,7 @@ EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtExportSvg( int nId, const wchar_t* wsFilePath) ;
+1 -1
View File
@@ -113,7 +113,7 @@ EXE_EXPORT bool ExeImportPnt( const std::string& sFilePath, int nFlag) ;
EXE_EXPORT bool ExeImportStl( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ;
EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath) ;
EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath) ;
EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1) ;
EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath) ;
EXE_EXPORT bool ExeExportSvg( int nId, const std::string& sFilePath, int nFilter = 393) ;