From aaa369064cb879bdfd205c7d36866845dd670e53 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 7 May 2015 07:03:39 +0000 Subject: [PATCH] Include : - aggiunta CompareNoCase - aggiornamento. --- EGnStringUtils.h | 9 +++++++-- EInAPI.h | 12 ++++++------ EMkMachMgr.h | 2 +- EXeExecutor.h | 5 +++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/EGnStringUtils.h b/EGnStringUtils.h index 30fc7a1..a842490 100644 --- a/EGnStringUtils.h +++ b/EGnStringUtils.h @@ -13,9 +13,9 @@ #pragma once -#include #include "/EgtDev/Include/EgnStringBase.h" #include "/EgtDev/Include/EgtNumCollection.h" +#include //----------------------- Macro per import/export ----------------------------- #undef EGN_EXPORT @@ -60,7 +60,12 @@ inline std::string& ToLower( std::string& sString) { std::transform( sString.begin(), sString.end(), sString.begin(), ::tolower) ; return sString ; } - +inline bool +CompareNoCase( const std::string& sL, const std::string& sR) + { return ( sL.size() == sR.size() && + std::equal( sL.cbegin(), sL.cend(), sR.cbegin(), + []( std::string::value_type cL, std::string::value_type cR) + { return tolower( cL) == tolower( cR); })) ; } //---------------------------------------------------------------------------- inline bool IsEmptyOrSpaces( const std::string& sName) diff --git a/EInAPI.h b/EInAPI.h index 9d29a38..9825689 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -32,14 +32,14 @@ extern "C" { // API // General -EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* sLogFile, const wchar_t* sLogMsg) ; +EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ; EIN_EXPORT BOOL __stdcall EgtExit( void) ; -EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* sKey) ; -EIN_EXPORT BOOL __stdcall EgtSetFont( const wchar_t* sNfeFontDir, const wchar_t* sDefaultFont) ; +EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ; +EIN_EXPORT BOOL __stdcall EgtSetFont( const wchar_t* wsNfeFontDir, const wchar_t* wsDefaultFont) ; EIN_EXPORT BOOL __stdcall EgtGetNfeFontDir( wchar_t*& wsNfeFontDir) ; EIN_EXPORT BOOL __stdcall EgtGetDefaultFont( wchar_t*& wsDefaultFont) ; -EIN_EXPORT BOOL __stdcall EgtSetLuaLibs( const wchar_t* sLuaLibsDir) ; -EIN_EXPORT BOOL __stdcall EgtSetCommandLogger( const wchar_t* sLogFile) ; +EIN_EXPORT BOOL __stdcall EgtSetLuaLibs( const wchar_t* wsLuaLibsDir) ; +EIN_EXPORT BOOL __stdcall EgtSetCommandLogger( const wchar_t* wsLogFile) ; EIN_EXPORT void __stdcall EgtEnableCommandLogger( void) ; EIN_EXPORT void __stdcall EgtDisableCommandLogger( void) ; EIN_EXPORT BOOL __stdcall EgtGetVersionInfo( wchar_t*& wsVer) ; @@ -47,7 +47,7 @@ EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ; EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ; EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ; EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ; -EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* sMsg) ; +EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ; // GeomDB EIN_EXPORT int __stdcall EgtInitGeomDB( void) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index ee64553..4afb684 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -29,7 +29,7 @@ class __declspec( novtable) IMachMgr public : // Basic virtual ~IMachMgr( void) {} - virtual bool Init( IGeomDB* pGeomDB, const std::string& sMachinesDir) = 0 ; + virtual bool Init( int nContextId, IGeomDB* pGeomDB, const std::string& sMachinesDir) = 0 ; virtual bool Update( void) = 0 ; virtual bool Insert( int nInsGrp) = 0 ; // MachGroups diff --git a/EXeExecutor.h b/EXeExecutor.h index 1620466..add062f 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -20,6 +20,7 @@ #define NOMINMAX #include +class LuaMgr ; //----------------------- Macro per import/export ---------------------------- #undef EXE_EXPORT @@ -45,6 +46,7 @@ EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ; EXE_EXPORT bool ExeGetOsInfo( std::string& sOs) ; EXE_EXPORT bool ExeGetCpuInfo( std::string& sCpu) ; EXE_EXPORT bool ExeGetMemoryInfo( std::string& sMem) ; +EXE_EXPORT bool ExeOutLog( const std::string& sMsg) ; // GeomDB EXE_EXPORT int ExeInitGeomDB( void) ; @@ -89,6 +91,9 @@ EXE_EXPORT bool ExeLuaExecFile( const std::string& sFilePath) ; EXE_EXPORT bool ExeLuaRequire( const std::string& sFilePath) ; EXE_EXPORT bool ExeLuaGetLastError( std::string& sError) ; +// LUA Base +EXE_EXPORT bool LuaInstallEgtFunctions( LuaMgr& LuaMgr) ; + // GeomDB Create EXE_EXPORT int ExeCreateGroup( int nParentId, const Frame3d& frFrame, int nRefType) ; EXE_EXPORT int ExeCreateGeoPoint( int nParentId, const Point3d& ptP, int nRefType) ;