MeVisLabToolboxReference
Macros

Macros

#define ML_ADD_FIELD(NAME_P, TYPE_P, VALUE_P)   (static_cast<TYPE_P##Field*> (this->getFieldContainer()->addField(NAME_P, #TYPE_P, VALUE_P)));
 Macro to add a field in the constructor of an ML module. More...
 
#define ML_DISALLOW_COPY_AND_ASSIGN(className)
 Macro to make a copy constructor and assignment private, to avoid copying and assigning of macros. More...
 
#define ML_FRIEND_TEST(test_case_name, test_name)   friend class test_case_name##_##test_name##_Test
 Can be used to make a specific class a friend of a given test to allow testing of protected functionality with GoogleTest. More...
 
#define ML_BASE_IS_A(base, type)   ((base && base->getTypeId()) ? base->getTypeId()->isDerivedFrom(type::getClassTypeId()) : false)
 ML_BASE_IS_A macro is used to check if the given Base pointer is of the wanted type. More...
 
#define ML_CLASS_SOURCE(className, parentName)
 This macro has to be put into the source file of a non-abstract class to implement the methods declared with ML_CLASS_HEADER This interface implemented by this macro permits the handling of this class type by the runtime type interface. More...
 
#define ML_ROOT_CLASS_SOURCE(className)   ML_CLASS_SOURCE(className,)
 This macro has to be put into the source file of a non-abstract class to implement the methods declared with ML_CLASS_HEADER This version shall be used for classes with no parent class. More...
 
#define ML_ABSTRACT_CLASS_HEADER(className)   ML_INTERNAL_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM, ML_EMPTY_PARAM, override)
 Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol. More...
 
#define ML_ABSTRACT_CLASS_SOURCE(className, parentName)   ML_INTERNAL_CLASS_SOURCE(className,parentName, NULL) \
 This macro has to be put into the source file of an abstract class to implement the methods declared with ML_ABSTRACT_CLASS_HEADER This interface implemented by this macro permits the handling of this class type by the runtime type interface. More...
 
#define ML_ABSTRACT_ROOT_CLASS_SOURCE(className)   ML_ABSTRACT_CLASS_SOURCE(className,)
 This macro has to be put into the source file of an abstract class to implement the methods declared with ML_ABSTRACT_CLASS_HEADER This version shall be used for classes with no parent class. More...
 
#define ML_MODULE_CLASS_HEADER(className)
 Like ML_CLASS_HEADER for the usage of derived classes from Module. More...
 
#define ML_MODULE_CLASS_SOURCE(className, parentName)
 Like ML_CLASS_SOURCE for the usage of derived classes from Module. More...
 
#define ML_ABSTRACT_MODULE_CLASS_HEADER(className)
 Like ML_ABSTRACT_CLASS_HEADER for the usage of derived classes from Module. More...
 
#define ML_ABSTRACT_MODULE_CLASS_SOURCE(className, parentName)
 Like ML_ABSTRACT_CLASS_SOURCE for the usage of derived classes from Module. More...
 
#define ML_MODULE_CLASS_SOURCE_EXT(className, parentName, superClassConstructs)
 Like ML_MODULE_CLASS_SOURCE where some stuff can be passed which initializes super class stuff or members. More...
 
#define ML_ABSTRACT_MODULE_CLASS_SOURCE_EXT(className, parentName, superClassConstructs)
 Like ML_ABSTRACT_MODULE_CLASS_SOURCE where some stuff can be passed which initializes super class stuff or members. More...
 
#define ML_LIBRARY_USER_DESTROY_CODE
 This macro is defined but empty in normal cases. More...
 
#define ML_INIT_LIBRARY_EXT_3(initMethod, NAMESP, LIB_TARGET)
 ML_INIT_LIBRARY_EXT_3 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. More...
 
#define ML_INIT_LIBRARY(initMethod)   _ML_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. More...
 
#define ML_INIT_LIBRARY_EXT(initMethod, NAME_SP)   _ML_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, MEVIS_TARGET)
 Define ML_INIT_LIBRARY_EXT with two arguments. More...
 
#define _ML_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, LIB_TARGET)   ML_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. More...
 
#define ML_INIT_LIBRARY_EXT_2(initMethod, NAME_SP, LIB_TARGET)   ML_INIT_LIBRARY_EXT_3(initMethod, NAME_SP, LIB_TARGET)
 Facade macro to disable the library initialization in case of a static ML build. More...
 

Variable Types for Typed Handlers

#define ML_IMPLEMENT_VARIABLE_TYPE_BEGIN(NAME)
 Macro to declare a variable type, needs to be followed by 0-N ML_IMPLEMENT_VARIABLE_TYPE_CASE macros and finished with a ML_IMPLEMENT_VARIABLE_TYPE_END macro. More...
 
#define ML_IMPLEMENT_VARIABLE_TYPE_END
 Macro to end declaration of a variable type. More...
 
#define ML_IMPLEMENT_VARIABLE_TYPE_CASE(TYPE)
 Macro to implement standard type case in a variable type. More...
 
#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT
 Defines a variable type case block for all float types. More...
 
#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_INTEGER
 Defines a variable type case block for all integer types. More...
 
#define ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(DATATYPE, TYPE)
 
#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_COMPLEX
 
#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_DEFAULT_EXTENDED
 

ML String Prefixes

#define ML_PREFIX   "ML"
 Library identification prefix for messages from the ML. More...
 
#define ML_CONSTANT_PREFIX   "ML_"
 Prefix for environment variables and debugging constants used in the ML. More...
 

MIN/MAX/QUOTE MACROS

#define ML_MIN(X, Y)   (((X) < (Y)) ? (X) : (Y))
 The ML specific MIN macro. More...
 
#define ML_MAX(X, Y)   (((X) > (Y)) ? (X) : (Y))
 The ML specific MAX macro. More...
 
#define ML_ABS(X)   (((X) < (0)) ? ((X) * (-1)) : (X))
 The ML specific ABS macro. More...
 
#define ML_QUOTE(A)   #A
 Defines a quotation macro to get a string from a macro parameter. More...
 
#define ML_CLAMP(v, l, h)   ((v)<(l) ? (l) : (v) > (h) ? (h) : (v))
 Clamps the input to the specified range. More...
 
#define ML_LERP(a, l, h)   ((l)+(((h)-(l))*(a)))
 Linear interpolation from l (when a=0) to h (when a=1) (equal to (a*h)+((1-a)*l). More...
 
#define ML_BYTE_TO_KB(x)   ((x) >> 10)
 
#define ML_BYTE_TO_MB(x)   ((x) >> 20)
 Converts the value from byte to megabyte. More...
 
#define ML_BYTE_TO_GB(x)   ((x) >> 30)
 Converts the value from byte to gigabyte. More...
 
#define ML_KB_TO_BYTE(x)   ((x) << 10)
 Converts the value from kilobyte to byte. More...
 
#define ML_MB_TO_BYTE(x)   ((x) << 20)
 Converts the value from megabyte to byte. More...
 
#define ML_GB_TO_BYTE(x)   ((x) << 30)
 Converts the value from gigabyte to byte. More...
 

Detailed Description

Macro Definition Documentation

◆ _ML_INIT_LIBRARY_EXT_HELPER

#define _ML_INIT_LIBRARY_EXT_HELPER (   initMethod,
  NAME_SP,
  LIB_TARGET 
)    ML_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 238 of file mlLibraryInitMacros.h.

◆ ML_ABS

#define ML_ABS (   X)    (((X) < (0)) ? ((X) * (-1)) : (X))

The ML specific ABS macro.

See also mlAbs templates in mlUtilsSystem.h.

Definition at line 402 of file mlTypeDefs.h.

Referenced by ml::Tmat3< MLdouble >::jacobi().

◆ ML_ABSTRACT_CLASS_HEADER

#define ML_ABSTRACT_CLASS_HEADER (   className)    ML_INTERNAL_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM, ML_EMPTY_PARAM, override)

Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.

Definition at line 215 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_CLASS_SOURCE

#define ML_ABSTRACT_CLASS_SOURCE (   className,
  parentName 
)    ML_INTERNAL_CLASS_SOURCE(className,parentName, NULL) \

This macro has to be put into the source file of an abstract class to implement the methods declared with ML_ABSTRACT_CLASS_HEADER This interface implemented by this macro permits the handling of this class type by the runtime type interface.

Definition at line 228 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_MODULE_CLASS_HEADER

#define ML_ABSTRACT_MODULE_CLASS_HEADER (   className)
Value:
/* Implement normal class header stuff. */ \
ML_ABSTRACT_CLASS_HEADER(className) \
\
/* Implement private copy constructor. */ \
private: className(const className&); \
\
/* Implement private assignment operator. */ \
private: className& operator=(const className&); \

Like ML_ABSTRACT_CLASS_HEADER for the usage of derived classes from Module.

It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error.

Definition at line 278 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_MODULE_CLASS_SOURCE

#define ML_ABSTRACT_MODULE_CLASS_SOURCE (   className,
  parentName 
)
Value:
/* Implement normal class source stuff. */ \
ML_ABSTRACT_CLASS_SOURCE(className, parentName)

Like ML_ABSTRACT_CLASS_SOURCE for the usage of derived classes from Module.

It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error. This is also useful to avoid compiler warnings.

Definition at line 297 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_MODULE_CLASS_SOURCE_EXT

#define ML_ABSTRACT_MODULE_CLASS_SOURCE_EXT (   className,
  parentName,
  superClassConstructs 
)
Value:
/* Implement normal class source stuff. */ \
ML_ABSTRACT_CLASS_SOURCE(className, parentName)

Like ML_ABSTRACT_MODULE_CLASS_SOURCE where some stuff can be passed which initializes super class stuff or members.

Definition at line 317 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_ROOT_CLASS_SOURCE

#define ML_ABSTRACT_ROOT_CLASS_SOURCE (   className)    ML_ABSTRACT_CLASS_SOURCE(className,)

This macro has to be put into the source file of an abstract class to implement the methods declared with ML_ABSTRACT_CLASS_HEADER This version shall be used for classes with no parent class.

Definition at line 237 of file mlRuntimeSubClass.h.

◆ ML_ADD_FIELD

#define ML_ADD_FIELD (   NAME_P,
  TYPE_P,
  VALUE_P 
)    (static_cast<TYPE_P##Field*> (this->getFieldContainer()->addField(NAME_P, #TYPE_P, VALUE_P)));

Macro to add a field in the constructor of an ML module.

Definition at line 32 of file mlModule.h.

◆ ML_BASE_IS_A

#define ML_BASE_IS_A (   base,
  type 
)    ((base && base->getTypeId()) ? base->getTypeId()->isDerivedFrom(type::getClassTypeId()) : false)

ML_BASE_IS_A macro is used to check if the given Base pointer is of the wanted type.

Identical and parent class types are accepted. Invalid or not initialized types are always considered as non equal. Please consider using mlbase_cast<> as an modern alternative to this macro. Usage: ML_BASE_IS_A(base, MarkerExample).

Definition at line 36 of file mlRuntimeSubClass.h.

Referenced by ml::ITKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >::getWrappedInputObject(), ml::VTKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >::getWrappedInputObject(), ml::ITKDifferenceFunctionFromBasePointer(), ml::ITKNodeContainerFromBasePointer(), ml::ITKPointSetFromBasePointer(), ml::ITKPolylineFromBasePointer(), and ml::ListContainerTemplate< StringList >::setActiveList().

◆ ML_BYTE_TO_GB

#define ML_BYTE_TO_GB (   x)    ((x) >> 30)

Converts the value from byte to gigabyte.

Definition at line 37 of file mlMemoryManager.h.

◆ ML_BYTE_TO_KB

#define ML_BYTE_TO_KB (   x)    ((x) >> 10)

Converts the value from byte to kilobyte.

Definition at line 33 of file mlMemoryManager.h.

◆ ML_BYTE_TO_MB

#define ML_BYTE_TO_MB (   x)    ((x) >> 20)

Converts the value from byte to megabyte.

Definition at line 35 of file mlMemoryManager.h.

◆ ML_CLAMP

#define ML_CLAMP (   v,
  l,
 
)    ((v)<(l) ? (l) : (v) > (h) ? (h) : (v))

Clamps the input to the specified range.

Definition at line 414 of file mlTypeDefs.h.

◆ ML_CLASS_SOURCE

#define ML_CLASS_SOURCE (   className,
  parentName 
)
Value:
ML_INTERNAL_CLASS_SOURCE(className,parentName, className::createCB) \
ML_INTERNAL_CLASS_CREATECB(className)
#define ML_INTERNAL_CLASS_SOURCE(className, parentName, createCB)

This macro has to be put into the source file of a non-abstract class to implement the methods declared with ML_CLASS_HEADER This interface implemented by this macro permits the handling of this class type by the runtime type interface.

Definition at line 187 of file mlRuntimeSubClass.h.

◆ ML_CONSTANT_PREFIX

#define ML_CONSTANT_PREFIX   "ML_"

Prefix for environment variables and debugging constants used in the ML.

Definition at line 114 of file mlTypeDefs.h.

◆ ML_DISALLOW_COPY_AND_ASSIGN

#define ML_DISALLOW_COPY_AND_ASSIGN (   className)
Value:
private: \
className(const className&); \
void operator=(const className &);

Macro to make a copy constructor and assignment private, to avoid copying and assigning of macros.

NOTE: It is not required to implement the methods.

Definition at line 17 of file mlMacros.h.

◆ ML_FRIEND_TEST

#define ML_FRIEND_TEST (   test_case_name,
  test_name 
)    friend class test_case_name##_##test_name##_Test

Can be used to make a specific class a friend of a given test to allow testing of protected functionality with GoogleTest.

Make sure that your test is placed in the ML_NAMESPACE as well.

Definition at line 53 of file mlMacros.h.

◆ ML_GB_TO_BYTE

#define ML_GB_TO_BYTE (   x)    ((x) << 30)

Converts the value from gigabyte to byte.

Definition at line 43 of file mlMemoryManager.h.

◆ ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE

#define ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE (   DATATYPE,
  TYPE 
)
Value:
case DATATYPE: \
static_cast<Derived*>(this)->template doSwitchingWithLabel<typename ML_NAMESPACE::internal::TypeTuple4Insert<Step, TYPE, PrevTypes>::Type>(args, static_cast<TargetLabelType*>(0)); \
break;

Definition at line 1063 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_BEGIN

#define ML_IMPLEMENT_VARIABLE_TYPE_BEGIN (   NAME)
Value:
template<class Derived, int Step, class Args = ML_NAMESPACE::internal::CalculateOutputSubImageArguments> \
class NAME : public VariableType { \
public: \
enum { IsEmpty = false }; \
\
static const char* name() { return #NAME; } \
\
template<typename PrevTypes, typename TargetLabelType> \
bool doSwitchingCode(int switchCode, const Args& args, bool printError = true) { \
static const char* switcherName = #NAME; \
bool result = true; \
switch (switchCode) {

Macro to declare a variable type, needs to be followed by 0-N ML_IMPLEMENT_VARIABLE_TYPE_CASE macros and finished with a ML_IMPLEMENT_VARIABLE_TYPE_END macro.

Example that defines a variable type that can handle ML[u]int[8|16] datatypes:

Definition at line 1026 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASE

#define ML_IMPLEMENT_VARIABLE_TYPE_CASE (   TYPE)
Value:
case TypeTraits<TYPE>::dataType: \
static_cast<Derived*>(this)->template doSwitchingWithLabel<typename ML_NAMESPACE::internal::TypeTuple4Insert<Step, TYPE, PrevTypes>::Type>(args, static_cast<TargetLabelType*>(0)); \
break;

Macro to implement standard type case in a variable type.

Definition at line 1058 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASES_COMPLEX

#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_COMPLEX
Value:
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLComplexdType, std::complex<MLdouble>)
#define ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(DATATYPE, TYPE)

Definition at line 1086 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASES_DEFAULT_EXTENDED

#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_DEFAULT_EXTENDED
Value:
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLComplexdType, std::complex<MLdouble>) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector2fType, Vector2f) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector2dType, Vector2d) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector3fType, Vector3f) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector3dType, Vector3d) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector6fType, Vector6f) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLVector6dType, Vector6d) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLMatrix2fType, Matrix2f) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLMatrix2dType, Matrix2d) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLMatrix3fType, Matrix3f) \
ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(MLMatrix3dType, Matrix3d)
Tvec2< MLfloat > Vector2f
A vector with 2 components of type float.
Definition: mlVector2.h:148
Tvec6< MLdouble > Vector6d
A vector with 6 components of type double.
Definition: mlVector6.h:186
Tmat3< MLdouble > Matrix3d
A 3x3 matrix of type double.
Definition: mlMatrix3.h:702
Tvec3< MLfloat > Vector3f
A vector with 3 components of type float.
Definition: mlVector3.h:286
#define ML_IMPLEMENT_VARIABLE_EXTENDED_TYPE_CASE(DATATYPE, TYPE)
Tmat2< MLfloat > Matrix2f
A 2x2 matrix of type float.
Definition: mlMatrix2.h:508
Tvec6< MLfloat > Vector6f
A vector with 6 components of type float.
Definition: mlVector6.h:184
Tvec3< MLdouble > Vector3d
A vector with 3 components of type double.
Definition: mlVector3.h:288
Tmat2< MLdouble > Matrix2d
A 2x2 matrix of type double.
Definition: mlMatrix2.h:510
Tvec2< MLdouble > Vector2d
A vector with 2 components of type double.
Definition: mlVector2.h:150
Tmat3< MLfloat > Matrix3f
A 3x3 matrix of type float.
Definition: mlMatrix3.h:700

Definition at line 1090 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT

#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLdouble)
#define ML_IMPLEMENT_VARIABLE_TYPE_CASE(TYPE)
Macro to implement standard type case in a variable type.
float MLfloat
Definition: mlTypeDefs.h:229
double MLdouble
Definition: mlTypeDefs.h:245

Defines a variable type case block for all float types.

Definition at line 1070 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASES_INTEGER

#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_INTEGER
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint8) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint16) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint16) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint32) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint32) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint64) \
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint64)
signed int MLint32
Definition: mlTypeDefs.h:189
#define ML_IMPLEMENT_VARIABLE_TYPE_CASE(TYPE)
Macro to implement standard type case in a variable type.
unsigned short MLuint16
Definition: mlTypeDefs.h:170
signed short MLint16
Definition: mlTypeDefs.h:153
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
Definition: mlTypeDefs.h:487
char MLint8
Definition: mlTypeDefs.h:125
INT64 MLint64
Introduce platform independent 64 bit signed integer type.
Definition: mlTypeDefs.h:474
unsigned int MLuint32
Definition: mlTypeDefs.h:213
unsigned char MLuint8
Definition: mlTypeDefs.h:137

Defines a variable type case block for all integer types.

Definition at line 1076 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_END

#define ML_IMPLEMENT_VARIABLE_TYPE_END
Value:
default: { \
result = false; \
if (printError) { \
char buf[512]=""; \
sprintf(buf, "No switch case for physical data type %d.", switchCode); \
ML_PRINT_FATAL_ERROR(switcherName, ML_BAD_DATA_TYPE, buf); } \
} \
break; \
} \
return result; \
} \
};
#define ML_BAD_DATA_TYPE
A wrong or unexpected data type has been passed to an algorithm which often is a programming error; t...
Definition: mlTypeDefs.h:892

Macro to end declaration of a variable type.

Definition at line 1042 of file mlTypedHandlers.h.

◆ ML_INIT_LIBRARY

#define ML_INIT_LIBRARY (   initMethod)    _ML_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_INIT_LIBRARY_EXT_2 for further documentation.

Definition at line 220 of file mlLibraryInitMacros.h.

◆ ML_INIT_LIBRARY_EXT

#define ML_INIT_LIBRARY_EXT (   initMethod,
  NAME_SP 
)    _ML_INIT_LIBRARY_EXT_HELPER(initMethod, NAME_SP, MEVIS_TARGET)

Define ML_INIT_LIBRARY_EXT with two arguments.

See ML_INIT_LIBRARY_EXT_2 for further documentation.

Definition at line 227 of file mlLibraryInitMacros.h.

◆ ML_INIT_LIBRARY_EXT_2

#define ML_INIT_LIBRARY_EXT_2 (   initMethod,
  NAME_SP,
  LIB_TARGET 
)    ML_INIT_LIBRARY_EXT_3(initMethod, NAME_SP, LIB_TARGET)

Facade macro to disable the library initialization in case of a static ML build.

Definition at line 246 of file mlLibraryInitMacros.h.

◆ ML_INIT_LIBRARY_EXT_3

#define ML_INIT_LIBRARY_EXT_3 (   initMethod,
  NAMESP,
  LIB_TARGET 
)

ML_INIT_LIBRARY_EXT_3 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.

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_NAMESPACE, however in rare cases it could also be the namespace from another library.

Definition at line 98 of file mlLibraryInitMacros.h.

◆ ML_KB_TO_BYTE

#define ML_KB_TO_BYTE (   x)    ((x) << 10)

Converts the value from kilobyte to byte.

Definition at line 39 of file mlMemoryManager.h.

◆ ML_LERP

#define ML_LERP (   a,
  l,
 
)    ((l)+(((h)-(l))*(a)))

Linear interpolation from l (when a=0) to h (when a=1) (equal to (a*h)+((1-a)*l).

Definition at line 420 of file mlTypeDefs.h.

◆ ML_LIBRARY_USER_DESTROY_CODE

#define ML_LIBRARY_USER_DESTROY_CODE

This macro is defined but empty in normal cases.

If a library needs dedicated destruction code implemented in a function, for example named MyLibraryDestructionCode(), then a programmer can undefine the macro and redefine it containing the destruction code. Then the ML_INIT_LIBRARY library macro is used normally. For example:

#undef ML_LIBRARY_USER_DESTROY_CODE #define ML_LIBRARY_USER_DESTROY_CODE MyLibraryDestructionCode();

ML_INIT_LIBRARY(UserLibraryNameInitFunction);

The code is executed before the destruction of the runtime types of the library.

Definition at line 77 of file mlLibraryInitMacros.h.

◆ ML_MAX

#define ML_MAX (   X,
  Y 
)    (((X) > (Y)) ? (X) : (Y))

The ML specific MAX macro.

See also mlMin and mlMax templates in mlUtilsSystem.h.

Definition at line 396 of file mlTypeDefs.h.

Referenced by ml::BaseListTemplate< XMarker >::readStateFromTree().

◆ ML_MB_TO_BYTE

#define ML_MB_TO_BYTE (   x)    ((x) << 20)

Converts the value from megabyte to byte.

Definition at line 41 of file mlMemoryManager.h.

◆ ML_MIN

#define ML_MIN (   X,
  Y 
)    (((X) < (Y)) ? (X) : (Y))

The ML specific MIN macro.

See also mlMin and mlMax templates in mlUtilsSystem.h.

Definition at line 390 of file mlTypeDefs.h.

◆ ML_MODULE_CLASS_HEADER

#define ML_MODULE_CLASS_HEADER (   className)
Value:
/* Implement normal class header stuff. */ \
ML_CLASS_HEADER(className) \
\
/* Implement private copy constructor. */ \
private: className(const className&); \
\
/* Implement private assignment operator. */ \
private: className& operator=(const className&); \

Like ML_CLASS_HEADER for the usage of derived classes from Module.

It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error.

Definition at line 248 of file mlRuntimeSubClass.h.

◆ ML_MODULE_CLASS_SOURCE

#define ML_MODULE_CLASS_SOURCE (   className,
  parentName 
)
Value:
/* Implement normal class source stuff. */ \
ML_CLASS_SOURCE(className, parentName)

Like ML_CLASS_SOURCE for the usage of derived classes from Module.

It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error. This is also useful to avoid compiler warnings.

Definition at line 267 of file mlRuntimeSubClass.h.

◆ ML_MODULE_CLASS_SOURCE_EXT

#define ML_MODULE_CLASS_SOURCE_EXT (   className,
  parentName,
  superClassConstructs 
)
Value:
/* Implement normal class source stuff. */ \
ML_CLASS_SOURCE(className, parentName)

Like ML_MODULE_CLASS_SOURCE where some stuff can be passed which initializes super class stuff or members.

Definition at line 307 of file mlRuntimeSubClass.h.

◆ ML_PREFIX

#define ML_PREFIX   "ML"

Library identification prefix for messages from the ML.

Definition at line 108 of file mlTypeDefs.h.

Referenced by ml::ErrorOutputInfos::ErrorOutputInfos().

◆ ML_QUOTE

#define ML_QUOTE (   A)    #A

Defines a quotation macro to get a string from a macro parameter.

Definition at line 408 of file mlTypeDefs.h.

◆ ML_ROOT_CLASS_SOURCE

#define ML_ROOT_CLASS_SOURCE (   className)    ML_CLASS_SOURCE(className,)

This macro has to be put into the source file of a non-abstract class to implement the methods declared with ML_CLASS_HEADER This version shall be used for classes with no parent class.

Definition at line 197 of file mlRuntimeSubClass.h.