MeVisLab Toolbox Reference
Macros

Overview documentation of the MLMemoryManager. More...

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)));
 This Module class is the most important base class to derive new image processing modules from; see class Module. More...
 
#define ML_DISALLOW_COPY_AND_ASSIGN(className)
 Defines basic 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)
 This file defines macros, which are inserted in classes to declare and implement additional class members for the Runtime Type System (see also mlRuntimeType.h, mlRuntime.h and mlRuntimeDict.h) 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, nullptr) \
 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_QUOTE_INTERNAL(A)   #A
 Defines a quotation macro to get a string from a macro parameter. More...
 
#define ML_LERP(a, l, h)   ((l)+(((h)-(l))*(a)))
 The ML specific MIN macro. More...
 
#define ML_QUOTE(A)   ML_QUOTE_INTERNAL(A)
 
#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

Overview documentation of the MLMemoryManager.

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 243 of file mlLibraryInitMacros.h.

◆ 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 212 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_CLASS_SOURCE

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

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 225 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 275 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 294 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 314 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 234 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)));

This Module class is the most important base class to derive new image processing modules from; see class Module.

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

Definition at line 35 of file mlModule.h.

◆ ML_BASE_IS_A

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

This file defines macros, which are inserted in classes to declare and implement additional class members for the Runtime Type System (see also mlRuntimeType.h, mlRuntime.h and mlRuntimeDict.h)

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 32 of file mlRuntimeSubClass.h.

◆ ML_BYTE_TO_GB

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

Converts the value from byte to gigabyte.

Definition at line 39 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 35 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 37 of file mlMemoryManager.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 184 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 92 of file mlTypeDefs.h.

◆ ML_DISALLOW_COPY_AND_ASSIGN

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

Defines basic macros.

Macro to make a copy constructor and assignment private

Deprecated:

Definition at line 23 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 65 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 45 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 1067 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:

#define ML_IMPLEMENT_VARIABLE_TYPE_CASE(TYPE)
Macro to implement standard type case in a variable type.
#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 ...
#define ML_IMPLEMENT_VARIABLE_TYPE_END
Macro to end declaration of a variable type.
unsigned char MLuint8
Definition: mlTypeDefs.h:115
unsigned short MLuint16
Definition: mlTypeDefs.h:148
signed short MLint16
Definition: mlTypeDefs.h:131
char MLint8
Definition: mlTypeDefs.h:103

Definition at line 1030 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 1062 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)
@ MLComplexdType
Definition: mlTypeDefs.h:734
@ MLComplexfType
Definition: mlTypeDefs.h:734

Definition at line 1090 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)
@ MLVector2fType
Definition: mlTypeDefs.h:738
@ MLMatrix2dType
Definition: mlTypeDefs.h:751
@ MLVector6fType
Definition: mlTypeDefs.h:742
@ MLVector3fType
Definition: mlTypeDefs.h:739
@ MLMatrix3dType
Definition: mlTypeDefs.h:752
@ MLVector3dType
Definition: mlTypeDefs.h:739
@ MLVector2dType
Definition: mlTypeDefs.h:738
@ MLMatrix3fType
Definition: mlTypeDefs.h:752
@ MLVector6dType
Definition: mlTypeDefs.h:742
@ MLMatrix2fType
Definition: mlTypeDefs.h:751
Tmat3< MLfloat > Matrix3f
A 3x3 matrix of type float.
Definition: mlMatrix3.h:705
Tvec2< MLdouble > Vector2d
A vector with 2 components of type double.
Definition: mlVector2.h:155
Tmat2< MLfloat > Matrix2f
A 2x2 matrix of type float.
Definition: mlMatrix2.h:512
Tvec2< MLfloat > Vector2f
A vector with 2 components of type float.
Definition: mlVector2.h:153
Tvec6< MLdouble > Vector6d
A vector with 6 components of type double.
Definition: mlVector6.h:190
Tvec6< MLfloat > Vector6f
A vector with 6 components of type float.
Definition: mlVector6.h:188
Tvec3< MLdouble > Vector3d
A vector with 3 components of type double.
Definition: mlVector3.h:296
Tmat2< MLdouble > Matrix2d
A 2x2 matrix of type double.
Definition: mlMatrix2.h:514
Tvec3< MLfloat > Vector3f
A vector with 3 components of type float.
Definition: mlVector3.h:294
Tmat3< MLdouble > Matrix3d
A 3x3 matrix of type double.
Definition: mlMatrix3.h:707

Definition at line 1094 of file mlTypedHandlers.h.

◆ ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT

#define ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLdouble)
double MLdouble
Definition: mlTypeDefs.h:223
float MLfloat
Definition: mlTypeDefs.h:207

Defines a variable type case block for all float types.

Definition at line 1074 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)
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
Definition: mlTypeDefs.h:513
unsigned int MLuint32
Definition: mlTypeDefs.h:191
INT64 MLint64
Include 64 bit integer support for Windows or Unix.
Definition: mlTypeDefs.h:500
signed int MLint32
Definition: mlTypeDefs.h:167

Defines a variable type case block for all integer types.

Definition at line 1080 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:884

Macro to end declaration of a variable type.

Definition at line 1046 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 225 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 232 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 251 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 103 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 41 of file mlMemoryManager.h.

◆ ML_LERP

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

The ML specific MIN macro.

See also mlMin and mlMax templates in mlUtilsSystem.h. The ML specific MAX macro. See also mlMin and mlMax templates in mlUtilsSystem.h. The ML specific ABS macro. See also mlAbs templates in mlUtilsSystem.h. Clamps the input to the specified range. Linear interpolation from l (when a=0) to h (when a=1) (equal to (a*h)+((1-a)*l).

Definition at line 448 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 82 of file mlLibraryInitMacros.h.

◆ ML_MB_TO_BYTE

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

Converts the value from megabyte to byte.

Definition at line 43 of file mlMemoryManager.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 245 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 264 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 304 of file mlRuntimeSubClass.h.

◆ ML_PREFIX

#define ML_PREFIX   "ML"

Library identification prefix for messages from the ML.

Definition at line 86 of file mlTypeDefs.h.

◆ ML_QUOTE

#define ML_QUOTE (   A)    ML_QUOTE_INTERNAL(A)

Definition at line 370 of file mlTypeDefs.h.

◆ ML_QUOTE_INTERNAL

#define ML_QUOTE_INTERNAL (   A)    #A

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

Definition at line 369 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 194 of file mlRuntimeSubClass.h.