Package com.openinventor.inventor.lock
Class SoLicensesInfo
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.lock.SoLicensesInfo
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Calls check(productName, version, (java.lang.String)null, true, (java.lang.String[])null).static int
Calls check(productName, version, licenseString, true, (java.lang.String[])null).static int
Calls check(productName, version, licenseString, printWarning, (java.lang.String[])null).static int
check
(String productName, float version, String licenseString, boolean printWarning, String[] errReport) Query if Open Inventor or an extension module is licensed on this machine.static SoLicensesInfo
ReturnsSoLicensesInfo
singleton.Gets the licensed product corresponding to the givenSoLicensedProduct.SbProduct
.getLicensedProductByIndex
(int index) Gets the licensed product corresponding to the given index.static float
Returns the current version number as a float for license checking.int
Gets number of licensed products.static String
Returns a character string identifying the version of the Open Inventor library in use.Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
check
Calls check(productName, version, licenseString, true, (java.lang.String[])null). -
check
Calls check(productName, version, (java.lang.String)null, true, (java.lang.String[])null). -
check
public static int check(String productName, float version, String licenseString, boolean printWarning) Calls check(productName, version, licenseString, printWarning, (java.lang.String[])null). -
check
public static int check(String productName, float version, String licenseString, boolean printWarning, String[] errReport) Query if Open Inventor or an extension module is licensed on this machine.- Parameters:
productName
- : Product to be licensed (no blanks), e.g. OpenInventor or VolumeVizLDM.version
- : Version to be licensed (seegetLicensingVersionNumber
).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:- Before checking for a FlexNet license token,
SoLicensesInfo.check
will automatically append "SDK" to the productName when you need an SDK license to run on the current machine.
- Before checking for a FlexNet license token,
- Returns:
- < 0 If product or version is NOT licensed on this machine.
>= 0 If product and version are licensed and can be used. Note: If productName is "ScaleViz" and ScaleViz is licensed on this machine. Then the return value is the number of render nodes allowed.
-
getLicensedProductByIndex
Gets the licensed product corresponding to the given index. If the given index is greater than the value returned bygetProductCount()
, the method returns NULL. -
getLicensingVersionNumber
public static float getLicensingVersionNumber()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 methodcheck
for usage of this number.If you need a descriptive string see
getVersion
. -
getProductCount
public int getProductCount()Gets number of licensed products. -
getInstance
ReturnsSoLicensesInfo
singleton. -
getLicensedProduct
Gets the licensed product corresponding to the givenSoLicensedProduct.SbProduct
. If the given product is invalid, the method returns NULL. -
getVersion
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
.
-