ML Reference
mlRuntimeSubClass.h File Reference
#include "mlRuntimeType.h"

Go to the source code of this file.

Macros

#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)
 
#define ML_EMPTY_PARAM
 Define an empty macro needed to pass empty macro parameters.
 
#define ML_INTERNAL_CLASS_HEADER_CREATECB(EXP_SYM)
 
#define ML_INTERNAL_CLASS_HEADER_EXPORTED(className, EXP_SYM, ML_INTERNAL_VIRTUAL, ML_INTERNAL_OVERRIDE)
 
#define ML_CLASS_HEADER_EXPORTED(className, EXP_SYM)
 This macro has to be put into the header of a non-abstract class to declare some additional methods described below.
 
#define ML_CLASS_HEADER(className)
 Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
 
#define ML_ROOT_CLASS_HEADER(className)
 
#define ML_INTERNAL_CLASS_SOURCE(className, parentName, createCB)
 
#define ML_INTERNAL_CLASS_CREATECB(className)
 
#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_EXPORTED(className, EXP_SYM)    ML_INTERNAL_CLASS_HEADER_EXPORTED(className, EXP_SYM, ML_EMPTY_PARAM, override)
 This macro has to be put into the header of an abstract class to declare some additional methods described below This interface implemented by this macro permits the handling of this class type by the runtime type interface.
 
#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.
 
#define ML_ABSTRACT_ROOT_CLASS_HEADER(className)    ML_INTERNAL_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM, virtual , ML_EMPTY_PARAM)
 
#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.
 
#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.
 

Macro Definition Documentation

◆ ML_ABSTRACT_CLASS_HEADER_EXPORTED

#define ML_ABSTRACT_CLASS_HEADER_EXPORTED ( className,
EXP_SYM )    ML_INTERNAL_CLASS_HEADER_EXPORTED(className, EXP_SYM, ML_EMPTY_PARAM, override)

This macro has to be put into the header of an abstract class to declare some additional methods described below This interface implemented by this macro permits the handling of this class type by the runtime type interface.

Definition at line 194 of file mlRuntimeSubClass.h.

◆ ML_ABSTRACT_ROOT_CLASS_HEADER

#define ML_ABSTRACT_ROOT_CLASS_HEADER ( className)     ML_INTERNAL_CLASS_HEADER_EXPORTED(className, ML_EMPTY_PARAM, virtual , ML_EMPTY_PARAM)

Definition at line 205 of file mlRuntimeSubClass.h.

◆ ML_CLASS_HEADER

#define ML_CLASS_HEADER ( className)
Value:
ML_INTERNAL_CLASS_HEADER_CREATECB(ML_EMPTY_PARAM)
#define ML_EMPTY_PARAM
Define an empty macro needed to pass empty macro parameters.
#define ML_INTERNAL_CLASS_HEADER_EXPORTED(className, EXP_SYM, ML_INTERNAL_VIRTUAL, ML_INTERNAL_OVERRIDE)

Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.

Definition at line 98 of file mlRuntimeSubClass.h.

◆ ML_CLASS_HEADER_EXPORTED

#define ML_CLASS_HEADER_EXPORTED ( className,
EXP_SYM )
Value:
ML_INTERNAL_CLASS_HEADER_EXPORTED(className, EXP_SYM, ML_EMPTY_PARAM, override) \
ML_INTERNAL_CLASS_HEADER_CREATECB(EXP_SYM)

This macro has to be put into the header of a non-abstract class to declare some additional methods described below.

This interface implemented by this macro permits the handling of this class type by the runtime type interface. EXP_SYM can be an export symbol for the case that the class itself is not exported.

Definition at line 90 of file mlRuntimeSubClass.h.

◆ ML_EMPTY_PARAM

#define ML_EMPTY_PARAM

Define an empty macro needed to pass empty macro parameters.

Definition at line 39 of file mlRuntimeSubClass.h.

◆ ML_INTERNAL_CLASS_CREATECB

#define ML_INTERNAL_CLASS_CREATECB ( className)
Value:
/* Creates an instance of this class type. */ \
void* className::createCB() \
{ \
return new className(); \
} \

Definition at line 159 of file mlRuntimeSubClass.h.

◆ ML_INTERNAL_CLASS_HEADER_CREATECB

#define ML_INTERNAL_CLASS_HEADER_CREATECB ( EXP_SYM)
Value:
public: \
/* Creates an instance of this class type. */ \
[[nodiscard]] \
EXP_SYM static void* createCB(); \
private:

Definition at line 42 of file mlRuntimeSubClass.h.

◆ ML_INTERNAL_CLASS_HEADER_EXPORTED

#define ML_INTERNAL_CLASS_HEADER_EXPORTED ( className,
EXP_SYM,
ML_INTERNAL_VIRTUAL,
ML_INTERNAL_OVERRIDE )

Definition at line 49 of file mlRuntimeSubClass.h.

◆ ML_INTERNAL_CLASS_SOURCE

#define ML_INTERNAL_CLASS_SOURCE ( className,
parentName,
createCB )

Definition at line 106 of file mlRuntimeSubClass.h.

◆ ML_ROOT_CLASS_HEADER

#define ML_ROOT_CLASS_HEADER ( className)
Value:
ML_INTERNAL_CLASS_HEADER_CREATECB(ML_EMPTY_PARAM)

Definition at line 102 of file mlRuntimeSubClass.h.