EgtGeomKernel 1.6c6 :
- migliorata gestione codici di protezione (con opzioni).
This commit is contained in:
+25
-20
@@ -25,23 +25,19 @@
|
||||
#include "/EgtDev/Include/EgtNumCollection.h"
|
||||
#include "/EgtDev/Include/SELkMachineId.h"
|
||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||
#include <new>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const int GDB_PROD = 1231 ;
|
||||
const int GDB_VER = 16 ;
|
||||
const int GDB_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
IGeomDB*
|
||||
CreateGeomDB( void)
|
||||
{
|
||||
// verifico la chiave
|
||||
int nRet = VerifyKey( GetEGkKey(), GDB_PROD, GDB_VER, GDB_LEV) ;
|
||||
int nRet = VerifyKey( GetEGkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (" + ToString( nRet) + ")" ;
|
||||
string sErr = "Error on Key (GKC/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return nullptr ;
|
||||
}
|
||||
@@ -78,13 +74,6 @@ GeomDB::Init( void)
|
||||
m_GrpRadix.SetMaterial( Color()) ;
|
||||
// imposto riferimento griglia standard
|
||||
m_GridFrame = GLOB_FRM ;
|
||||
// verifico la chiave
|
||||
int nRet = VerifyKey( GetEGkKey(), GDB_PROD, GDB_VER, GDB_LEV) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
@@ -111,10 +100,18 @@ GeomDB::Clear( void)
|
||||
bool
|
||||
GeomDB::Load( const string& sFileIn, int nGroupId)
|
||||
{
|
||||
// verifico la chiave
|
||||
int nRet = VerifyKey( GetEGkKey(), GDB_PROD, GDB_VER, GDB_LEV) ;
|
||||
// verifico la chiave e le opzioni
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetKeyOptions( GetEGkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (" + ToString( nRet) + ")" ;
|
||||
string sErr = "Error on Key (GKL/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
if ( (nOpt1 & KEYOPT_EGK_BASE) == 0 || nOptExpDays < GetCurrDay()) {
|
||||
string sErr = "Error on Key (GKL/OPT)" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
@@ -251,10 +248,18 @@ GeomDB::LoadOneObj( NgeReader& ngeIn, int nGroupId, int nBaseGdbId, const INTVEC
|
||||
bool
|
||||
GeomDB::Save( const string& sFileOut, int nFlag) const
|
||||
{
|
||||
// verifico la chiave
|
||||
int nRet = VerifyKey( GetEGkKey(), GDB_PROD, GDB_VER, GDB_LEV) ;
|
||||
// verifico la chiave e le opzioni
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetKeyOptions( GetEGkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (" + ToString( nRet) + ")" ;
|
||||
string sErr = "Error on Key (GKS/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
if ( (nOpt1 & KEYOPT_EGK_SAVE) == 0 || nOptExpDays < GetCurrDay()) {
|
||||
string sErr = "Error on Key (GKS/OPT)" ;
|
||||
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user