Class managing every licensed product. More...
#include <Inventor/lock/SoLicensesInfo.h>
Static Public Member Functions | |
static int | getProductCount () |
static const SoLicensedProduct & | getLicensedProduct (int index) |
static const SoLicensedProduct & | getLicensedProduct (SbProduct prod) |
static void | registerExpirationCallback (SoLicensesCB *cb) |
static void | registerWarningCallback (int nbDaysBeforeExpiration, SoLicensesCB *cb) |
static const char * | getVersion () |
static float | getLicensingVersionNumber () |
static int | check (const char *productName, float version, const char *licenseString=NULL, SbBool printWarning=TRUE, char **errReport=NULL) |
SoLicensesInfo manages licensed products. SoLicensesInfo::setCallback(SoLicensesCB*) deactivates the default message box to call the specified callback.
Version Number: You can query the Open Inventor version number as a string using the getVersion() method or as a floating point value using the getLicensingVersionNumber() method. You can find other integer and string constants in SoVersion.h. For example SO_INVENTOR_VERSION can be used with preprocessor directives to isolate version specific code. It encodes the major, minor and patch numbers as an integer. For example "9400" for version 9.4.
static int SoLicensesInfo::check | ( | const char * | productName, | |
float | version, | |||
const char * | licenseString = NULL , |
|||
SbBool | printWarning = TRUE , |
|||
char ** | errReport = NULL | |||
) | [static] |
Query if Open Inventor or an extension module is licensed on this machine.
Note: If productName is "ScaleViz" and ScaleViz is licensed on this machine. Then the return value is the number of render nodes allowed.
productName | : Product to be licensed (no blanks), e.g. OpenInventor or VolumeVizLDM. | |
version | : Version to be licensed (see getLicensingVersionNumber). | |
licenseString | : (optional) Embedded application password string, if any. | |
printWarning | : If true, error and warning messages (if any) will be displayed to user. | |
errReport | : If not NULL, will be set to point to the text of the error or warning messages (if any). Note! This address is an internal static buffer and must not be freed by the application. |
FlexNet Notes:
static const SoLicensedProduct& SoLicensesInfo::getLicensedProduct | ( | SbProduct | prod | ) | [static] |
Gets the licensed product corresponding to the given SbProduct.
static const SoLicensedProduct& SoLicensesInfo::getLicensedProduct | ( | int | index | ) | [static] |
Gets the licensed product corresponding to the given index.
static float SoLicensesInfo::getLicensingVersionNumber | ( | ) | [static] |
Returns current version number for license checking.
See method check.
If you need a descriptive string see getVersion. If you just need the version number as an integer or string, see the macros in SoVersion.h.
static int SoLicensesInfo::getProductCount | ( | ) | [static] |
Gets number of licensed products.
static const char* SoLicensesInfo::getVersion | ( | ) | [static] |
Returns a character string identifying the version of the Open Inventor library in use.
For example: "9.4.0.0" for the 9.4 release.
For a floating point version number see getLicensingVersionNumber. For integer and string constants, see SoVersion.h.
static void SoLicensesInfo::registerExpirationCallback | ( | SoLicensesCB * | cb | ) | [static] |
Sets the callback to call when a license is expired.
If a callback is registered, the default message box will not be displayed.
static void SoLicensesInfo::registerWarningCallback | ( | int | nbDaysBeforeExpiration, | |
SoLicensesCB * | cb | |||
) | [static] |
Sets the callback to call when a license date of expiration is lower than nbDayBeforeExpiration.
If a callback is registered, the default message box will not be displayed.