MeVisLab Toolbox Reference
mlRuntime.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_RUNTIME_H
14#define ML_RUNTIME_H
15
24
25//ML-includes
26#include "mlUtilsSystem.h"
27#include "mlRuntimeType.h"
28
29#include <vector>
30
31ML_UTILS_START_NAMESPACE
32
34 class RuntimeDict;
36
37 //-------------------------------------------------------------------------
48 //-------------------------------------------------------------------------
50
51 public:
53 static void init();
54
56 static void destroy();
57
61 static const RuntimeType* fromName(const char* name);
62
80 static const RuntimeType* initType(const RuntimeType *classType,
81 const char *parentName,
82 const char *classPrefix,
83 const char *className,
85 const char *classNameReplacement=nullptr);
86
89 static void destroyType(const char* name);
90
92 static const RuntimeType* badType();
93
96 static void setRecentlyLoadedDllName(const char* name);
97
100 static const char* getRecentlyLoadedDllName();
101
105 static void destroyRuntimeTypesOfDll(const char* dllName);
106
112 static std::vector<const RuntimeType*> getAllDerivedFrom(const RuntimeType *parentType,
113 bool onlyFromDifferentDlls=false);
114
116 static std::vector<const RuntimeType*> getAllTypes();
117
124 [[nodiscard]]
125 static const char *_getCheckedTypeIdName(const RuntimeType* classType,
126 const char *className);
127
128 protected:
137 static const RuntimeType* createType(const char *parentName,
138 const char *name,
140 };
141
142
143ML_UTILS_END_NAMESPACE
144
145#endif // __mlRuntime_H
void * RuntimeTypeCreateCB()
static void init()
Initializes the runtime type dictionary.
static std::vector< const RuntimeType * > getAllDerivedFrom(const RuntimeType *parentType, bool onlyFromDifferentDlls=false)
static const char * getRecentlyLoadedDllName()
static std::vector< const RuntimeType * > getAllTypes()
Returns all types that are registered in the typesystem.
static void destroyRuntimeTypesOfDll(const char *dllName)
static void destroy()
Destroys the runtime type dictionary.
static const RuntimeType * badType()
Returns a global badtype instance of RuntimeType.
static void setRecentlyLoadedDllName(const char *name)
static const char * _getCheckedTypeIdName(const RuntimeType *classType, const char *className)
static const RuntimeType * fromName(const char *name)
static void destroyType(const char *name)
static const RuntimeType * initType(const RuntimeType *classType, const char *parentName, const char *classPrefix, const char *className, RuntimeType::RuntimeTypeCreateCB *createCB, const char *classNameReplacement=nullptr)
static const RuntimeType * createType(const char *parentName, const char *name, RuntimeType::RuntimeTypeCreateCB *callback)
#define ML_UTILS_EXPORT
Definition mlUtilities.h:18