Localsolver  5.5
localsolver::LSVersion Class Reference

Detailed Description

Version and copyright info.

Static Public Member Functions

static int getMajorVersionNumber ()
 Returns LocalSolver's major version number.
static int getMinorVersionNumber ()
 Returns LocalSolver's minor version number.
static int getBuildDate ()
 Returns LocalSolver's build date.
static std::string getPlatform ()
 Returns the platform of the LocalSolver's binary as a string.
static std::string getVersion ()
 Returns LocalSolver's version as a string.
static int getVersionCode ()
 Returns LocalSolver's version code as an integer in the range [0, 29999].
static std::string getCopyright ()
 Returns LocalSolver's copyright as a string.
static std::string getInfo ()
 Returns version and copyright info as a string.
static std::string getLicensePath ()
 Returns the license path of LocalSolver.
static void setLicensePath (const std::string &licensePath)
 Change the license path used by LocalSolver.
static std::string getLicenseContent ()
 Returns the license content previously set with setLicenseContent.
static void setLicenseContent (const std::string &licenseContent)
 Change the license content.

Member Function Documentation

static int localsolver::LSVersion::getMajorVersionNumber ( )
inlinestatic

Returns LocalSolver's major version number.

This number is an integer in the range [0, 2999].

Returns
Major version number.
static int localsolver::LSVersion::getMinorVersionNumber ( )
inlinestatic

Returns LocalSolver's minor version number.

This number is an integer in the range [0, 9].

Returns
Minor version number.
static int localsolver::LSVersion::getBuildDate ( )
inlinestatic

Returns LocalSolver's build date.

This number is an integer YYYYMMDD with YYYY the year, MM the month, DD the day.

Returns
Build date.
static std::string localsolver::LSVersion::getPlatform ( )
inlinestatic

Returns the platform of the LocalSolver's binary as a string.

The format of the string is PPPPXX where PPPP is the platform (Win, Linux or MacOS) and XX is the architecture (32 or 64 bits).

Returns
Platform as string.
Since
3.0
static std::string localsolver::LSVersion::getVersion ( )
inlinestatic

Returns LocalSolver's version as a string.

The format of the string is: MA.MI.YYYYMMDD-PPPPXX with MA the major number version, MI the minor number version, YYYY the year, MM the month, DD the day, PPPP the platform (Win, Linux or MacOS) and XX the architecture.

Returns
Version as string "MA.MI.YYYYMMDD-PPPPXX".
static int localsolver::LSVersion::getVersionCode ( )
inlinestatic

Returns LocalSolver's version code as an integer in the range [0, 29999].

The version code is computed as follows: MA * 10 + MI with MA the major number version, MI the minor number version. Note that the version code can be encoded as a 16-bit integer.

Returns
Version code.
static std::string localsolver::LSVersion::getCopyright ( )
inlinestatic

Returns LocalSolver's copyright as a string.

Returns
Copyright notice.
static std::string localsolver::LSVersion::getInfo ( )
inlinestatic

Returns version and copyright info as a string.

Returns
Version and copyright info.
static std::string localsolver::LSVersion::getLicensePath ( )
inlinestatic

Returns the license path of LocalSolver.

By default, LocalSolver looks for the license in 4 different locations :

  1. In the file specified by setLicensePath.
  2. In the current directory. If a file 'license.dat' exists, it is used as default license.
  3. In the environment variable LS_LICENSE_PATH.
  4. In the default location (c:.dat on windows, /opt/localsolver_X_Y/license.dat on Linux and Mac OS)

Use setLicensePath to change the license path at runtime.

Returns
Path to the license
See Also
setLicensePath
getLicenseContent
setLicenseContent
Since
3.0
static void localsolver::LSVersion::setLicensePath ( const std::string &  licensePath)
inlinestatic

Change the license path used by LocalSolver.

Parameters
licensePathnew path for the license
See Also
getLicensePath
setLicenseContent
getLicenseContent
Since
3.0
static std::string localsolver::LSVersion::getLicenseContent ( )
inlinestatic

Returns the license content previously set with setLicenseContent.

See Also
setLicenseContent
getLicensePath
setLicensePath
Since
5.0
Returns
The content of the license or an empty string if the content was not set.
static void localsolver::LSVersion::setLicenseContent ( const std::string &  licenseContent)
inlinestatic

Change the license content.

By default, LocalSolver try to get the license from the path specified in setLicensePath or in a default location. Use this function to set the license content directly, without using a file.

Parameters
licenseContentcontent of the license to use.
See Also
getLicenseContent
setLicensePath
getLicensePath
Since
5.0