ML Reference
MeVis/Foundation/Sources/MLUtilities/mlUtilsLibraryInitMacros.h File Reference

ML Utils macro definitions for library initialization declaring and implementing registration code for the Runtime Type System. More...

#include "mlVersion.h"
#include "mlErrorOutput.h"
#include "mlErrorOutputInfos.h"
#include "mlRuntime.h"

Go to the source code of this file.

Defines

#define ML_UTILS_INIT_LIBRARY_EXT_2(initMethod, NAMESP, LIB_TARGET)
 ML_UTILS_LIBRARY_EXT_2 is a macro used to initialize shared libraries independent of the underlying system (WIN32/Unix), the given init method is called as soon as possible after loading the library.
#define ML_UTILS_INIT_LIBRARY(initMethod)   _ML_UTILS_INIT_LIBRARY_EXT_HELPER(initMethod, ML_UTILS_NAMESPACE, MEVIS_TARGET)
 Standard version used for library initialization of classes within the ML_NAMESPACE or ML_UTILS_NAMESPACE.
#define ML_UTILS_INIT_LIBRARY_EXT(initMethod, NAME_SP)   _ML_UTILS_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, MEVIS_TARGET)
 Define ML_UTILS_INIT_LIBRARY_EXT with two arguments.
#define _ML_UTILS_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, LIB_TARGET)   ML_UTILS_INIT_LIBRARY_EXT_2(initMethod, NAME_SP, LIB_TARGET)
 Internal helper macro for unpacking the LIB_TARGET argument on the correct macro level; not to be used directly, because it is subject to change.

Detailed Description

ML Utils macro definitions for library initialization declaring and implementing registration code for the Runtime Type System.

Author:
Wolf Spindler

Definition in file mlUtilsLibraryInitMacros.h.


Define Documentation

#define _ML_UTILS_INIT_LIBRARY_EXT_HELPER (   initMethod,
  NAME_SP,
  LIB_TARGET 
)    ML_UTILS_INIT_LIBRARY_EXT_2(initMethod, NAME_SP, LIB_TARGET)

Internal helper macro for unpacking the LIB_TARGET argument on the correct macro level; not to be used directly, because it is subject to change.

MEVIS_TARGET is a compiler definition usually defined on the compiler command line or in the make file. It is necessary to unpack it with another helper macro level, because not the definition but its value is needed.

Definition at line 209 of file mlUtilsLibraryInitMacros.h.

#define ML_UTILS_INIT_LIBRARY (   initMethod)    _ML_UTILS_INIT_LIBRARY_EXT_HELPER(initMethod, ML_UTILS_NAMESPACE, MEVIS_TARGET)

Standard version used for library initialization of classes within the ML_NAMESPACE or ML_UTILS_NAMESPACE.

See ML_UTILS_INIT_LIBRARY_EXT_2 for further documentation. This macro is to be used only for libraries which depend on mlUtils but not of the ML.

Definition at line 189 of file mlUtilsLibraryInitMacros.h.

#define ML_UTILS_INIT_LIBRARY_EXT (   initMethod,
  NAME_SP 
)    _ML_UTILS_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, MEVIS_TARGET)

Define ML_UTILS_INIT_LIBRARY_EXT with two arguments.

See ML_UTILS_INIT_LIBRARY_EXT_2 for further documentation. This macro is to be used only for libraries which depend on mlUtils but not of the ML.

Definition at line 198 of file mlUtilsLibraryInitMacros.h.

#define ML_UTILS_INIT_LIBRARY_EXT_2 (   initMethod,
  NAMESP,
  LIB_TARGET 
)

ML_UTILS_LIBRARY_EXT_2 is a macro used to initialize shared libraries independent of the underlying system (WIN32/Unix), the given init method is called as soon as possible after loading the library.

This macro is to be used only for libraries which depend on mlUtils but not of the ML. Former implementations used the name of the initMethod to derive the name of the DLL for the call to setRecentlyLoadedDllName, now the compiler switch MEVIS_TARGET is used instead which is more reliable. It needs to be passed as LIB_TARGET. NAMESP is typically the ML namespace ML_UTILS_NAMESPACE, however in rare cases it could also be the namespace from another library.

Definition at line 85 of file mlUtilsLibraryInitMacros.h.