Class managing every licensed product. More...
#include <Inventor/lock/SoLicensesInfo.h>
Public Member Functions | |
unsigned int | getProductCount () const |
Gets number of licensed products. | |
const SoLicensedProduct * | getLicensedProductByIndex (unsigned int index) const |
Gets the licensed product corresponding to the given index. | |
const SoLicensedProduct * | getLicensedProduct (SoLicensedProduct::SbProduct prod) const |
Gets the licensed product corresponding to the given SoLicensedProduct::SbProduct. | |
void | registerExpirationCallback (SoLicensesCB *cb) |
Sets the callback to call when a license is expired. | |
void | registerWarningCallback (int nbDaysBeforeExpiration, SoLicensesCB *cb) |
Sets the callback to call when a license date of expiration is lower than nbDayBeforeExpiration. | |
Static Public Member Functions | |
static SoLicensesInfo & | getInstance () |
Returns SoLicensesInfo singleton. | |
static const char * | getVersion () |
Returns a character string identifying the version of the Open Inventor library in use. | |
static float | getLicensingVersionNumber () |
Returns the current version number as a float for license checking. | |
static int | check (const char *productName, float version, const char *licenseString=NULL, SbBool printWarning=TRUE, char **errReport=NULL) |
Query if Open Inventor or an extension module is licensed on this machine. | |
Class managing every licensed product.
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.
Definition at line 58 of file SoLicensesInfo.h.
|
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 |
Returns SoLicensesInfo singleton.
const SoLicensedProduct * SoLicensesInfo::getLicensedProduct | ( | SoLicensedProduct::SbProduct | prod | ) | const |
Gets the licensed product corresponding to the given SoLicensedProduct::SbProduct.
If the given product is invalid, the method returns NULL.
const SoLicensedProduct * SoLicensesInfo::getLicensedProductByIndex | ( | unsigned int | index | ) | const |
Gets the licensed product corresponding to the given index.
If the given index is greater than the value returned by getProductCount(), the method returns NULL.
|
static |
Returns the current version number as a float for license checking.
The integer part of the float is the year of the published version and the floating part is 1 or 2 for the version first or second version of the year. For example 2023.2.7 will be returned as 2023.2, which corresponds to the 2nd version of OpenInventor in 2023. See method check for usage of this number.
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.
unsigned int SoLicensesInfo::getProductCount | ( | ) | const |
Gets number of licensed products.
|
static |
Returns a character string identifying the version of the Open Inventor library in use.
For example 2023.2.7 for the second version of OIV in 2023 and the 7th patch version.
For a floating point version number see getLicensingVersionNumber. For integer and string constants, see SoVersion.h.
void SoLicensesInfo::registerExpirationCallback | ( | SoLicensesCB * | cb | ) |
Sets the callback to call when a license is expired.
If a callback is registered, the default message box will not be displayed.
void SoLicensesInfo::registerWarningCallback | ( | int | nbDaysBeforeExpiration, |
SoLicensesCB * | cb | ||
) |
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.