Include :
- aggiornamento prototipi - modifiche a UserObjFactory per passaggio a C++ 20.
This commit is contained in:
+25
-25
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkUserObjFactory.h Data : 22.05.15 Versione : 1.6e3
|
||||
// File : EGkUserObjFactory.h Data : 31.10.25 Versione : 2.7k1
|
||||
// Contenuto : Factory della classe IUserObj.
|
||||
//
|
||||
//
|
||||
@@ -32,29 +32,6 @@
|
||||
#define USEROBJ_CREATE( sName) UserObjFactory::Create( sName)
|
||||
#define USEROBJ_GETLIST( vsList) UserObjFactory::GetList( vsList)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new(nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class UserObjFactory
|
||||
{
|
||||
@@ -76,3 +53,26 @@ class UserObjFactory
|
||||
// metodo di accesso alla mappa statica
|
||||
static CreatorMap& GetCreatorMap( void) ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new( std::nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
+2
-2
@@ -513,11 +513,11 @@ EXE_EXPORT bool ExeGeoObjDump( int nId, std::string& sDump) ;
|
||||
|
||||
// GeomDB Obj Attributes
|
||||
EXE_EXPORT bool ExeCopyAttributes( int nSouId, int nDestId) ;
|
||||
EXE_EXPORT bool ExeSetLevel( int nId, int nLevel) ;
|
||||
EXE_EXPORT bool ExeSetLevel( const INTVECTOR& vIds, int nLevel) ;
|
||||
EXE_EXPORT bool ExeRevertLevel( int nId) ;
|
||||
EXE_EXPORT bool ExeGetLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeGetCalcLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeSetMode( int nId, int nMode) ;
|
||||
EXE_EXPORT bool ExeSetMode( const INTVECTOR& vIds, int nMode) ;
|
||||
EXE_EXPORT bool ExeRevertMode( int nId) ;
|
||||
EXE_EXPORT bool ExeGetMode( int nId, int* pnMode) ;
|
||||
EXE_EXPORT bool ExeGetCalcMode( int nId, int* pnMode) ;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtKeyCodes.h Data : 01.08.25 Versione : 2.7h1
|
||||
// File : EgtKeyCodes.h Data : 01.11.25 Versione : 2.7k1
|
||||
// Contenuto : Costanti per codici di protezione librerie di base.
|
||||
//
|
||||
//
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const int KEY_BASELIB_PROD = 207 ;
|
||||
const int KEY_BASELIB_VER = 2710 ;
|
||||
const int KEY_BASELIB_VER = 2711 ;
|
||||
const int KEY_BASELIB_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user