Package com.openinventor.inventor.lock
Class SoLicensesInfo
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.lock.SoLicensesInfo
-
public class SoLicensesInfo extends Inventor
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 thegetLicensingVersionNumber()
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
check(java.lang.String productName, float version)
Calls check(productName, version, (java.lang.String)null, true, (java.lang.String[])null).static int
check(java.lang.String productName, float version, java.lang.String licenseString)
Calls check(productName, version, licenseString, true, (java.lang.String[])null).static int
check(java.lang.String productName, float version, java.lang.String licenseString, boolean printWarning)
Calls check(productName, version, licenseString, printWarning, (java.lang.String[])null).static int
check(java.lang.String productName, float version, java.lang.String licenseString, boolean printWarning, java.lang.String[] errReport)
Query if Open Inventor or an extension module is licensed on this machine.static SoLicensesInfo
getInstance()
ReturnsSoLicensesInfo
singleton.SoLicensedProduct
getLicensedProduct(SoLicensedProduct.SbProducts prod)
Gets the licensed product corresponding to the givenSoLicensedProduct.SbProduct
.SoLicensedProduct
getLicensedProductByIndex(int index)
Gets the licensed product corresponding to the given index.static float
getLicensingVersionNumber()
Returns the current version number as a float for license checking.int
getProductCount()
Gets number of licensed products.static java.lang.String
getVersion()
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 Detail
-
check
public static int check(java.lang.String productName, float version, java.lang.String licenseString)
Calls check(productName, version, licenseString, true, (java.lang.String[])null).
-
check
public static int check(java.lang.String productName, float version)
Calls check(productName, version, (java.lang.String)null, true, (java.lang.String[])null).
-
check
public static int check(java.lang.String productName, float version, java.lang.String licenseString, boolean printWarning)
Calls check(productName, version, licenseString, printWarning, (java.lang.String[])null).
-
check
public static int check(java.lang.String productName, float version, java.lang.String licenseString, boolean printWarning, java.lang.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
public SoLicensedProduct getLicensedProductByIndex(int index)
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 10*YYYY+H, where YYYY is the year of the published version, and H is 1 or 2. The floating part is the patch number. For example 2023.2.7 will be returned as 20232.7, which corresponds to the 7th patch of 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
public static SoLicensesInfo getInstance()
ReturnsSoLicensesInfo
singleton.
-
getLicensedProduct
public SoLicensedProduct getLicensedProduct(SoLicensedProduct.SbProducts prod)
Gets the licensed product corresponding to the givenSoLicensedProduct.SbProduct
. If the given product is invalid, the method returns NULL.
-
getVersion
public static java.lang.String 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
.
-
-