Manage loading libSalomeMeshGemsKeyGenerator. More...
Functions | |
| bool | SignCAD_After (void *meshgems_cad, std::string &error) |
| Sign a CAD. More... | |
| bool | UnlockProduct (const std::string &product, std::string &error) |
| Unlock a specific MeshGems product (for products called as a library) More... | |
| bool | SignCAD (void *meshgems_cad, std::string &error) |
| Sign a CAD (or don't do it if env MESHGEMS_OLD_STYLE is set) More... | |
| bool | SignMesh_After (void *meshgems_mesh, std::string &error) |
| Sign a mesh. More... | |
| bool | SignMesh (void *meshgems_mesh, const std::string &product, std::string &error) |
| Sign a mesh (or don't do it if env MESHGEMS_OLD_STYLE is set) More... | |
| std::string | GetKey_After (const std::string &gmfFile, int nbVertex, int nbEdge, int nbFace, int nbVol, std::string &error) |
| Return a license key to pass as argument to a MG mesher executable. More... | |
| std::string | GetKey_After (std::string &error) |
| Return a license key to pass as argument to a MG mesher executable (>2.15) More... | |
| int | GetMGVersionFromEnv (const char *env_variable) |
| Get MeshGems version major/minor/patch from the environment variables. More... | |
| int | GetMGVersionFromFunction (const char *function_name) |
| Get MeshGems version major/minor/patch from the keygen library and meshgems built-in functions. More... | |
| int | GetMGVersionHex (std::string &error) |
| Get MeshGems version from the keygen library or meshgems built-in functions. More... | |
| bool | NeedsMGSpatialEnvLicense (std::string &error) |
| Guess if the Spatial license is needed (if MeshGems is > 2.15.0) More... | |
| bool | SetMGSpatialEnvLicense (std::string &error) |
| Set the SPATIAL_LICENSE environment variable. More... | |
| std::string | GetKey (const std::string &gmfFile, int nbVertex, int nbEdge, int nbFace, int nbVol, std::string &error) |
| Get the license key from libMeshGemsKeyGenerator.so or $SPATIAL_LICENSE Called by plugins calling MG products as executables. More... | |
| std::string | GetKey (std::string &error) |
| Get the license key from libMeshGemsKeyGenerator.so or $SPATIAL_LICENSE Called for MG 2.15 by CADSurf and MG plugins calling MG products as library, i.e. More... | |
| bool | CheckKeyGenLibrary (std::string &error) |
| Return false if libMeshGemsKeyGenerator.so is not functional. More... | |
| std::string | GetLibraryName () |
| Return KeyGenerator library name. More... | |
Manage loading libSalomeMeshGemsKeyGenerator.
[so|dll] and sing MeshGems CAD or mesh
| bool SMESHUtils_MGLicenseKeyGen::CheckKeyGenLibrary | ( | std::string & | error | ) |
Return false if libMeshGemsKeyGenerator.so is not functional.
| [out] | error | - return error description |
References GetKey().
| std::string SMESHUtils_MGLicenseKeyGen::GetKey | ( | const std::string & | gmfFile, |
| int | nbVertex, | ||
| int | nbEdge, | ||
| int | nbFace, | ||
| int | nbVol, | ||
| std::string & | error | ||
| ) |
Get the license key from libMeshGemsKeyGenerator.so or $SPATIAL_LICENSE Called by plugins calling MG products as executables.
If MESHGEMS_OLD_STYLE is set, return "0", to use old DLIM8 server license instead of the key.
| [in] | gmfFile | - path to an input mesh file |
| [in] | nb* | - nb of entities in the input mesh |
| [out] | error | - return error description |
References GetKey_After(), MESHGEMS_OLD_STYLE, MESSAGE, NeedsMGSpatialEnvLicense(), SetMGSpatialEnvLicense(), and SPATIAL_LICENSE.
Referenced by CheckKeyGenLibrary(), MG_ADAPT::MgAdapt::getCommandToRun(), GetMGLicenseKeyImpl(), and SetMGSpatialEnvLicense().
| std::string SMESHUtils_MGLicenseKeyGen::GetKey | ( | std::string & | error | ) |
Get the license key from libMeshGemsKeyGenerator.so or $SPATIAL_LICENSE Called for MG 2.15 by CADSurf and MG plugins calling MG products as library, i.e.
compiled as library with -DSALOME_USE_MG_LIBS=ON
| [out] | error | - return error description |
References GetKey_After(), MESHGEMS_OLD_STYLE, MESSAGE, and SPATIAL_LICENSE.
| std::string SMESHUtils_MGLicenseKeyGen::GetKey_After | ( | const std::string & | gmfFile, |
| int | nbVertex, | ||
| int | nbEdge, | ||
| int | nbFace, | ||
| int | nbVol, | ||
| std::string & | error | ||
| ) |
| std::string SMESHUtils_MGLicenseKeyGen::GetKey_After | ( | std::string & | error | ) |
Return a license key to pass as argument to a MG mesher executable (>2.15)
| [out] | error | - return error description |
References GetProc.
| std::string SMESHUtils_MGLicenseKeyGen::GetLibraryName | ( | ) |
Return KeyGenerator library name.
| int SMESHUtils_MGLicenseKeyGen::GetMGVersionFromEnv | ( | const char * | env_variable | ) |
Get MeshGems version major/minor/patch from the environment variables.
| [out] | error | - return error description |
References MESSAGE.
Referenced by GetMGVersionHex().
| int SMESHUtils_MGLicenseKeyGen::GetMGVersionFromFunction | ( | const char * | function_name | ) |
Get MeshGems version major/minor/patch from the keygen library and meshgems built-in functions.
| [out] | error | - return error description |
References GetProc, and MESSAGE.
Referenced by GetMGVersionHex().
| int SMESHUtils_MGLicenseKeyGen::GetMGVersionHex | ( | std::string & | error | ) |
Get MeshGems version from the keygen library or meshgems built-in functions.
| [out] | error | - return error description |
References GetMGVersionFromEnv(), GetMGVersionFromFunction(), and MESSAGE.
Referenced by NeedsMGSpatialEnvLicense().
| bool SMESHUtils_MGLicenseKeyGen::NeedsMGSpatialEnvLicense | ( | std::string & | error | ) |
Guess if the Spatial license is needed (if MeshGems is > 2.15.0)
| [out] | error | - return error description |
References GetMGVersionHex(), MESHGEMS_215, and MESSAGE.
Referenced by GetKey(), SignCAD(), and SignMesh().
| bool SMESHUtils_MGLicenseKeyGen::SetMGSpatialEnvLicense | ( | std::string & | error | ) |
Set the SPATIAL_LICENSE environment variable.
| [out] | error | - return error description |
References GetKey(), MESSAGE, and SPATIAL_LICENSE.
Referenced by GetKey().
| bool SMESHUtils_MGLicenseKeyGen::SignCAD | ( | void * | meshgems_cad, |
| std::string & | error | ||
| ) |
Sign a CAD (or don't do it if env MESHGEMS_OLD_STYLE is set)
| [in] | meshgems_cad | - pointer to a MG CAD object (meshgems_cad_t) |
| [out] | error | - return error description |
References MESHGEMS_OLD_STYLE, NeedsMGSpatialEnvLicense(), SignCAD_After(), and UnlockProduct().
| bool SMESHUtils_MGLicenseKeyGen::SignCAD_After | ( | void * | meshgems_cad, |
| std::string & | error | ||
| ) |
Sign a CAD.
| [in] | meshgems_cad | - pointer to a MG CAD object (meshgems_cad_t) |
| [out] | error | - return error description |
References GetProc, SMESH::returnError(), SMESH_CATCH, and SMESH_TRY.
Referenced by SignCAD().
| bool SMESHUtils_MGLicenseKeyGen::SignMesh | ( | void * | meshgems_mesh, |
| const std::string & | product, | ||
| std::string & | error | ||
| ) |
Sign a mesh (or don't do it if env MESHGEMS_OLD_STYLE is set)
| [in] | meshgems_mesh | - pointer to a MG mesh (meshgems_mesh_t) |
| [in] | product | - product of MeshGems to unlock |
| [out] | error | - return error description |
References MESHGEMS_OLD_STYLE, NeedsMGSpatialEnvLicense(), SignMesh_After(), and UnlockProduct().
| bool SMESHUtils_MGLicenseKeyGen::SignMesh_After | ( | void * | meshgems_mesh, |
| std::string & | error | ||
| ) |
Sign a mesh.
| [in] | meshgems_mesh | - pointer to a MG mesh (meshgems_mesh_t) |
| [out] | error | - return error description |
References GetProc, SMESH::returnError(), SMESH_CATCH, and SMESH_TRY.
Referenced by SignMesh().
| bool SMESHUtils_MGLicenseKeyGen::UnlockProduct | ( | const std::string & | product, |
| std::string & | error | ||
| ) |
Unlock a specific MeshGems product (for products called as a library)
| [in] | product | - product of MeshGems to unlock |
| [out] | error | - return error description |
References GetProc, MESSAGE, SMESH::returnError(), SMESH_CATCH, and SMESH_TRY.
Referenced by SignCAD(), and SignMesh().