SoLicensesInfo Class Reference

VSG extension Class managing every licensed product. More...

#include <Inventor/lock/SoLicensesInfo.h>

List of all members.

Public Member Functions

unsigned int getProductCount () const
const SoLicensedProductgetLicensedProductByIndex (unsigned int index) const
const SoLicensedProductgetLicensedProduct (SoLicensedProduct::SbProduct prod) const
void registerExpirationCallback (SoLicensesCB *cb)
void registerWarningCallback (int nbDaysBeforeExpiration, SoLicensesCB *cb)

Static Public Member Functions

static SoLicensesInfogetInstance ()
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)

Detailed Description

VSG extension 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.


Member Function Documentation

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.

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.

Parameters:
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:

  • 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.
static SoLicensesInfo& SoLicensesInfo::getInstance (  )  [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 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.

unsigned int SoLicensesInfo::getProductCount (  )  const

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.

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.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/