MeVisLab Toolbox Reference
mlVersion.h File Reference
#include "mlUtilsSystemC.h"

Go to the source code of this file.

Macros

Version numbers for checks during COMPILE time.

Public header file for ML version support.

#define ML_MAJOR_VERSION   2
 The major release number which indicates general and essential changes of the ML which usually imply binary and header file incompatibilities. More...
 
#define ML_MAJOR_CAPI_VERSION   3
 Changes of this number signalize binary incompatibilities of the C-API of the ML which require a recompilation of applications using the ML via the C-API. More...
 
#define ML_CPPAPI_VERSION   7
 Changes of this number signalize binary incompatibilities of the C++ interface of the ML which require a recompilation of all classes using C++ ML symbols sometimes also C++ header file incompatibilities. More...
 
#define ML_CAPI_REVISION   0
 Changes of this number signalize a revision of the C-API of the ML which normally does not require a recompilation of applications using the ML via the C-API; this is typically caused by additional functionality in the C-API. More...
 
#define ML_REVISION   0
 Changes of this number indicates any revision of the ML which do not influence the binary compatibility (also docs, comments, installers); so dependent classes do not need to be recompiled. More...
 
#define ML_VERSION_STRING   "2.3.7.0.0"
 Version string constructed like "ML_MAJOR_VERSION.ML_MAJOR_CAPI_VERSION.ML_CPPAPI_VERSION.ML_CAPI_REVISION.ML_REVISION". More...
 

Functions

Version stuff for RUNTIME checks.
ML_UTILS_EXPORT void MLGetVersion (MLint32 *majorVersion, MLint32 *majorCAPIVersion, MLint32 *verCPPAPI, MLint32 *revCAPI, MLint32 *rev, const char **vString)
 Returns version information about the ML. More...
 
ML_UTILS_EXPORT MLint32 MLIsCAPILinkCompatible (MLint32 majorVersion, MLint32 majorCAPIVersion, MLint32 revCAPI)
 Checks whether the ML-API is link compatible. More...
 
ML_UTILS_EXPORT MLint32 MLIsCPPAPILinkCompatible (MLint32 majorVersion, MLint32 majorCAPIVersion, MLint32 verCPPAPI, MLint32 revCAPI)
 Checks whether the C++-API of the ML is link compatible. More...
 
ML_UTILS_EXPORT MLint32 MLCheckCPPAPILinkCompatibility (MLint32 majorVersion, MLint32 majorCAPIVersion, MLint32 verCPPAPI, MLint32 revCAPI, const char *mlVersionString, const char *initFunctionName)
 Checks whether the C++-API of the ML is link compatible and post errors to the MLErrorOutput if not. More...
 

Macro Definition Documentation

◆ ML_CAPI_REVISION

#define ML_CAPI_REVISION   0

Changes of this number signalize a revision of the C-API of the ML which normally does not require a recompilation of applications using the ML via the C-API; this is typically caused by additional functionality in the C-API.

Definition at line 43 of file mlVersion.h.

◆ ML_CPPAPI_VERSION

#define ML_CPPAPI_VERSION   7

Changes of this number signalize binary incompatibilities of the C++ interface of the ML which require a recompilation of all classes using C++ ML symbols sometimes also C++ header file incompatibilities.

Note that the C++ API is also considered changed if the C-API has changed.

Definition at line 38 of file mlVersion.h.

◆ ML_MAJOR_CAPI_VERSION

#define ML_MAJOR_CAPI_VERSION   3

Changes of this number signalize binary incompatibilities of the C-API of the ML which require a recompilation of applications using the ML via the C-API.

Definition at line 32 of file mlVersion.h.

◆ ML_MAJOR_VERSION

#define ML_MAJOR_VERSION   2

The major release number which indicates general and essential changes of the ML which usually imply binary and header file incompatibilities.

Definition at line 28 of file mlVersion.h.

◆ ML_REVISION

#define ML_REVISION   0

Changes of this number indicates any revision of the ML which do not influence the binary compatibility (also docs, comments, installers); so dependent classes do not need to be recompiled.

Definition at line 48 of file mlVersion.h.

◆ ML_VERSION_STRING

#define ML_VERSION_STRING   "2.3.7.0.0"

Version string constructed like "ML_MAJOR_VERSION.ML_MAJOR_CAPI_VERSION.ML_CPPAPI_VERSION.ML_CAPI_REVISION.ML_REVISION".

Definition at line 52 of file mlVersion.h.

Function Documentation

◆ MLCheckCPPAPILinkCompatibility()

ML_UTILS_EXPORT MLint32 MLCheckCPPAPILinkCompatibility ( MLint32  majorVersion,
MLint32  majorCAPIVersion,
MLint32  verCPPAPI,
MLint32  revCAPI,
const char *  mlVersionString,
const char *  initFunctionName 
)

Checks whether the C++-API of the ML is link compatible and post errors to the MLErrorOutput if not.

It is NOT legal to call this function before MLInitializeUtils() because error handling system must be initialized. Normally it is not necessary to call this function "manually" since the ML itself does these checks automatically when initializing the ML or loading modules. A typical call is like

libraryName,
initFunctionName))
{
executeInitializeLibraryCode();
}
#define ML_CAPI_REVISION
Changes of this number signalize a revision of the C-API of the ML which normally does not require a ...
Definition: mlVersion.h:43
#define ML_MAJOR_CAPI_VERSION
Changes of this number signalize binary incompatibilities of the C-API of the ML which require a reco...
Definition: mlVersion.h:32
ML_UTILS_EXPORT MLint32 MLCheckCPPAPILinkCompatibility(MLint32 majorVersion, MLint32 majorCAPIVersion, MLint32 verCPPAPI, MLint32 revCAPI, const char *mlVersionString, const char *initFunctionName)
Checks whether the C++-API of the ML is link compatible and post errors to the MLErrorOutput if not.
#define ML_MAJOR_VERSION
The major release number which indicates general and essential changes of the ML which usually imply ...
Definition: mlVersion.h:28
#define ML_VERSION_STRING
Version string constructed like "ML_MAJOR_VERSION.ML_MAJOR_CAPI_VERSION.ML_CPPAPI_VERSION....
Definition: mlVersion.h:52
#define ML_CPPAPI_VERSION
Changes of this number signalize binary incompatibilities of the C++ interface of the ML which requir...
Definition: mlVersion.h:38
Returns
Non-zero value true if binary compatibility is given and 0 if not.
Parameters
majorVersionThe major release number of the ML (normally specified by ML_MAJOR_VERSION).
majorCAPIVersionThe major C-API version number of the ML-API (normally specified by ML_MAJOR_CAPI_VERSION).
verCPPAPIThe C++-API version number of the ML (normally specified by ML_CPPAPI_VERSION).
revCAPIThe revision number of the C-API of the ML-API (normally specified by ML_CAPI_REVISION).
mlVersionStringmust be the null-terminated ML version string (normally specified by ML_VERSION_STRING). If NULL is passed then "<unknown version string>" is used instead.
initFunctionNameis the null-terminated string name of the library-init function which is going to be called on after validating the version If passed as NULL "<unknown init function>" is used instead.

◆ MLGetVersion()

ML_UTILS_EXPORT void MLGetVersion ( MLint32 majorVersion,
MLint32 majorCAPIVersion,
MLint32 verCPPAPI,
MLint32 revCAPI,
MLint32 rev,
const char **  vString 
)

Returns version information about the ML.

It is legal to call it before the MLInitializeUtils() is called.

Parameters
majorVersionReturns the compiled major release number specified by ML_MAJOR_VERSION. NULL is ignored and so it may be passed legally if this value is not needed.
majorCAPIVersionReturns the compiled major C-API version number specified by ML_MAJOR_CAPI_VERSION. NULL is ignored and so it may be passed legally if this value is not needed.
verCPPAPIReturns the compiled C++-API version number specified by ML_CPPAPI_VERSION. NULL is ignored and so it may be passed legally if this value is not needed.
revReturns the compiled ML revision number specified
revCAPIReturns the compiled C-API revision number specified by ML_CAPI_REVISION. NULL is ignored and so it may be passed legally if this value is not needed. by ML_REVISION. NULL is ignored and so it may be passed legally if this value is not needed.
vStringReturns a null terminated character string as "majorVersion.majorCAPIVersion.revCAPI.verCPPAPI.rev". NULL is ignored and so it may be passed legally if this value is not needed.

◆ MLIsCAPILinkCompatible()

ML_UTILS_EXPORT MLint32 MLIsCAPILinkCompatible ( MLint32  majorVersion,
MLint32  majorCAPIVersion,
MLint32  revCAPI 
)

Checks whether the ML-API is link compatible.

It is legal to call this function before MLInitializeUtils() is called.
Normally it is not necessary to call this function "manually" since the ML itself does these checks automatically when initializing the ML or loading modules. A typical call is like

// if (!MLIsCAPILinkCompatible(ML_MAJOR_VERSION,
// ML_MAJOR_CAPI_VERSION,
// ML_CAPI_REVISION)){ handleErr(); }
Returns
Non zero value (=true) if binary compatibility is given and 0 if not.
Parameters
majorVersionThe major release number of the ML (normally specified by ML_MAJOR_VERSION.
majorCAPIVersionThe major C-API version number of the ML-API (normally specified by ML_MAJOR_CAPI_VERSION).
revCAPIThe revision number of the C-API of the ML-API (normally specified by ML_CAPI_REVISION).

◆ MLIsCPPAPILinkCompatible()

ML_UTILS_EXPORT MLint32 MLIsCPPAPILinkCompatible ( MLint32  majorVersion,
MLint32  majorCAPIVersion,
MLint32  verCPPAPI,
MLint32  revCAPI 
)

Checks whether the C++-API of the ML is link compatible.

It is legal to call this function before MLInitializeUtils() is called.
Normally it is not necessary to call this function "manually" since the ML itself does these checks automatically when initializing the ML or loading modules. A typical call is like

// if (!MLIsCPPAPILinkCompatible(ML_MAJOR_VERSION,
// ML_MAJOR_CAPI_VERSION,
// ML_CPPAPI_VERSION,
// ML_CAPI_REVISION)){ handleErr(); }
Returns
Non zero value (=true) if binary compatibility is given and 0 if not.
Parameters
majorVersionThe major release number of the ML (normally specified by ML_MAJOR_VERSION).
majorCAPIVersionThe major C-API version number of the ML-API (normally specified by ML_MAJOR_CAPI_VERSION).
verCPPAPIThe C++-API version number of the ML (normally specified by ML_CPPAPI_VERSION).
revCAPIThe revision number of the C-API of the ML-API (normally specified by ML_CAPI_REVISION).