Defines | |
| #define | ML_ADD_FIELD(NAME_P, TYPE_P, VALUE_P) ((TYPE_P##Field*) this->getFieldContainer()->addField(NAME_P, #TYPE_P, VALUE_P)); |
| Macro to add a field in the constructor of an ML module. | |
| #define | ML_DISALLOW_COPY_AND_ASSIGN(className) |
| Macro to make a copy constructor and assignment private, to avoid copying and assigning of macros. | |
| #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. | |
| #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. | |
| #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. | |
| #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. | |
| #define | ML_ABSTRACT_CLASS_HEADER(className) ML_ABSTRACT_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM) |
| Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol. | |
| #define | ML_ABSTRACT_CLASS_SOURCE(className, parentName) |
| 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. | |
| #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. | |
| #define | ML_MODULE_CLASS_HEADER(className) |
Like ML_CLASS_HEADER for the usage of derived classes from Module. | |
| #define | ML_MODULE_CLASS_SOURCE(className, parentName) |
Like ML_CLASS_SOURCE for the usage of derived classes from Module. | |
| #define | ML_ABSTRACT_MODULE_CLASS_HEADER(className) |
Like ML_ABSTRACT_CLASS_HEADER for the usage of derived classes from Module. | |
| #define | ML_ABSTRACT_MODULE_CLASS_SOURCE(className, parentName) |
Like ML_ABSTRACT_CLASS_SOURCE for the usage of derived classes from Module. | |
| #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. | |
| #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. | |
| #define | ML_INIT_LIBRARY_EXT_2(initMethod, NAMESP, LIB_TARGET) |
| ML_INIT_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_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. | |
| #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. | |
| #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. | |
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 or ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE macros and finished with a ML_IMPLEMENT_VARIABLE_TYPE_END macro. | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_END |
| Macro to end declaration of a variable type. | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_CASE(TYPE) |
| Macro to implement standard type case in a variable type. | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(TYPE) |
| Macro to implement carrier type case in a variable type (Automatically maps to CarrierXIn types for variable types 1-3). | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT |
| Defines a variable type case block for all float types. | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_CASES_INTEGER |
| Defines a variable type case block for all integer types. | |
| #define | ML_IMPLEMENT_VARIABLE_TYPE_CASES_CARRIERTYPE |
| Defines a variable type case block for all carrier types. | |
ML String Prefixes | |
| #define | ML_PREFIX "ML" |
| Library identification prefix for messages from the ML. | |
| #define | ML_CONSTANT_PREFIX "ML_" |
| Prefix for environment variables and debugging constants used in the ML. | |
MIN/MAX/QUOTE MACROS | |
| #define | ML_MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) |
| The ML specific MIN macro. | |
| #define | ML_MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) |
| The ML specific MAX macro. | |
| #define | ML_ABS(X) (((X) < (0)) ? ((X) * (-1)) : (X)) |
| The ML specific ABS macro. | |
| #define | ML_QUOTE(A) #A |
| Defines a quotation macro to get a string from a macro parameter. | |
| #define | ML_CLAMP(v, l, h) ((v)<(l) ? (l) : (v) > (h) ? (h) : (v)) |
| Clamps the input to the specified range. | |
| #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). | |
| #define | ML_BYTE_TO_KB(x) ((x) >> 10) |
| #define | ML_BYTE_TO_MB(x) ((x) >> 20) |
| Converts the value from byte to megabyte. | |
| #define | ML_BYTE_TO_GB(x) ((x) >> 30) |
| Converts the value from byte to gigabyte. | |
| #define | ML_KB_TO_BYTE(x) ((x) << 10) |
| Converts the value from kilobyte to byte. | |
| #define | ML_MB_TO_BYTE(x) ((x) << 20) |
| Converts the value from megabyte to byte. | |
| #define | ML_GB_TO_BYTE(x) ((x) << 30) |
| Converts the value from gigabyte to byte. | |
| #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 230 of file mlLibraryInitMacros.h.
| #define ML_ABS | ( | X | ) | (((X) < (0)) ? ((X) * (-1)) : (X)) |
The ML specific ABS macro.
See also mlAbs templates in mlUtilsSystem.h.
Definition at line 405 of file mlTypeDefs.h.
Referenced by ml::Tmat3< DT >::jacobi().
| #define ML_ABSTRACT_CLASS_HEADER | ( | className | ) | ML_ABSTRACT_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM) |
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
Definition at line 254 of file mlRuntimeSubClass.h.
| #define ML_ABSTRACT_CLASS_SOURCE | ( | className, | |||
| parentName | ) |
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 265 of file mlRuntimeSubClass.h.
| #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&); \
Module.
It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error.
Definition at line 383 of file mlRuntimeSubClass.h.
| #define ML_ABSTRACT_MODULE_CLASS_SOURCE | ( | className, | |||
| parentName | ) |
Value:
/* Implement normal class source stuff. */ \ ML_ABSTRACT_CLASS_SOURCE(className, parentName)
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 402 of file mlRuntimeSubClass.h.
| #define ML_ABSTRACT_MODULE_CLASS_SOURCE_EXT | ( | className, | |||
| parentName, | |||||
| superClassConstructs | ) |
Value:
/* Implement normal class source stuff. */ \ ML_ABSTRACT_CLASS_SOURCE(className, parentName)
Definition at line 422 of file mlRuntimeSubClass.h.
| #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 342 of file mlRuntimeSubClass.h.
| #define ML_ADD_FIELD | ( | NAME_P, | |||
| TYPE_P, | |||||
| VALUE_P | ) | ((TYPE_P##Field*) this->getFieldContainer()->addField(NAME_P, #TYPE_P, VALUE_P)); |
| #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 42 of file mlRuntimeSubClass.h.
Referenced by ml::VTKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >::getWrappedInputObject(), ml::ITKMLBaseWrapper< OBJ_TYPE, OBJ_TYPE_POINTER, WRAPPER_CLASS_NAME >::getWrappedInputObject(), ml::ITKDifferenceFunctionFromBasePointer(), ml::ITKNodeContainerFromBasePointer(), ml::ITKPointSetFromBasePointer(), ml::ITKPolylineFromBasePointer(), and ml::ListContainerTemplate< T >::setActiveList().
| #define ML_BYTE_TO_GB | ( | x | ) | ((x) >> 30) |
| #define ML_BYTE_TO_KB | ( | x | ) | ((x) >> 10) |
Converts the value from byte to kilobyte.
Definition at line 32 of file mlMemoryManager.h.
| #define ML_BYTE_TO_MB | ( | x | ) | ((x) >> 20) |
| #define ML_CLAMP | ( | v, | |||
| l, | |||||
| h | ) | ((v)<(l) ? (l) : (v) > (h) ? (h) : (v)) |
| #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.
Definition at line 123 of file mlRuntimeSubClass.h.
| #define ML_CONSTANT_PREFIX "ML_" |
Prefix for environment variables and debugging constants used in the ML.
Definition at line 108 of file mlTypeDefs.h.
| #define ML_DISALLOW_COPY_AND_ASSIGN | ( | className | ) |
Value:
private: \ className(const className&); \ void operator=(const className &);
NOTE: It is not required to implement the methods.
Definition at line 17 of file mlMacros.h.
| #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.
| #define ML_GB_TO_BYTE | ( | x | ) | ((x) << 30) |
| #define ML_IMPLEMENT_VARIABLE_TYPE_BEGIN | ( | NAME | ) |
Value:
template<class Derived, class DispatchStep, class Args = ML_NAMESPACE::internal::CalculateOutputSubImageArguments> \ class NAME : public VariableType { \ public: \ enum { Step = DispatchStep::Step, 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) {
Example that defines a variable type that can handle ML[u]int[8|16] datatypes:
ML_IMPLEMENT_VARIABLE_TYPE_BEGIN(MyInt8And16Types) ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint8) ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint8) ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint16) ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLint16) ML_IMPLEMENT_VARIABLE_TYPE_END
Definition at line 1018 of file mlTypedHandlers.h.
| #define ML_IMPLEMENT_VARIABLE_TYPE_CASE | ( | TYPE | ) |
Value:
case TypeTraits<TYPE>::physicalDataType: \ static_cast<Derived*>(this)->template doSwitchingWithLabel<typename ML_NAMESPACE::internal::TypeTuple4Insert<Step, TYPE, PrevTypes>::Type>(args, static_cast<TargetLabelType*>(0)); \ break;
Definition at line 1050 of file mlTypedHandlers.h.
| #define ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE | ( | TYPE | ) |
Value:
case TypeTraits<TYPE>::physicalDataType + DispatchStep::CarrierOffset: { \ typedef typename PhysicalTypeSelector<TypeTraits<TYPE>::physicalDataType + DispatchStep::CarrierOffset>::Type ResultType; \ static_cast<Derived*>(this)->template doSwitchingWithLabel<typename ML_NAMESPACE::internal::TypeTuple4Insert<Step, ResultType, PrevTypes>::Type >(args, static_cast<TargetLabelType*>(0)); \ } break; \
Definition at line 1057 of file mlTypedHandlers.h.
| #define ML_IMPLEMENT_VARIABLE_TYPE_CASES_CARRIERTYPE |
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier4) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier8) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier12) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier16) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier24) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier32) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier64) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier128)\ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier256)\ ML_IMPLEMENT_VARIABLE_TYPE_CASE_CARRIERTYPE(MLCarrier512)
Definition at line 1084 of file mlTypedHandlers.h.
| #define ML_IMPLEMENT_VARIABLE_TYPE_CASES_FLOAT |
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLfloat) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLdouble) \ ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLldouble)
Definition at line 1065 of file mlTypedHandlers.h.
| #define ML_IMPLEMENT_VARIABLE_TYPE_CASES_INTEGER |
Value:
ML_IMPLEMENT_VARIABLE_TYPE_CASE(MLuint8) \ 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)
Definition at line 1072 of file mlTypedHandlers.h.
| #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; \ } \ };
Definition at line 1034 of file mlTypedHandlers.h.
| #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 212 of file mlLibraryInitMacros.h.
| #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 219 of file mlLibraryInitMacros.h.
| #define ML_INIT_LIBRARY_EXT_2 | ( | initMethod, | |||
| NAMESP, | |||||
| LIB_TARGET | ) |
ML_INIT_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.
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 88 of file mlLibraryInitMacros.h.
| #define ML_KB_TO_BYTE | ( | x | ) | ((x) << 10) |
| #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).
Definition at line 423 of file mlTypeDefs.h.
| #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 399 of file mlTypeDefs.h.
Referenced by ml::BaseListTemplate< T >::readStateFromTree().
| #define ML_MB_TO_BYTE | ( | x | ) | ((x) << 20) |
| #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 393 of file mlTypeDefs.h.
| #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&); \
Module.
It implements a private copy constructor and assignment operator to avoid their usage which would be a programming error.
Definition at line 353 of file mlRuntimeSubClass.h.
| #define ML_MODULE_CLASS_SOURCE | ( | className, | |||
| parentName | ) |
Value:
/* Implement normal class source stuff. */ \ ML_CLASS_SOURCE(className, parentName)
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 372 of file mlRuntimeSubClass.h.
| #define ML_MODULE_CLASS_SOURCE_EXT | ( | className, | |||
| parentName, | |||||
| superClassConstructs | ) |
Value:
/* Implement normal class source stuff. */ \ ML_CLASS_SOURCE(className, parentName)
Definition at line 412 of file mlRuntimeSubClass.h.
| #define ML_PREFIX "ML" |
Library identification prefix for messages from the ML.
Definition at line 102 of file mlTypeDefs.h.
Referenced by ml::ErrorOutputInfos::ErrorOutputInfos().
| #define ML_QUOTE | ( | A | ) | #A |
Defines a quotation macro to get a string from a macro parameter.
Definition at line 411 of file mlTypeDefs.h.
| #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 207 of file mlRuntimeSubClass.h.
1.5.8