13#ifndef ML_RUNTIME_DICT_H 
   14#define ML_RUNTIME_DICT_H 
   26#include <unordered_map> 
   30ML_UTILS_START_NAMESPACE
 
   95                                                        bool onlyFromDifferentDlls = 
false);
 
  105      std::unordered_map<std::string, const RuntimeType*> _dict;
 
 
  108ML_UTILS_END_NAMESPACE
 
This file declares the class RuntimeDict that manages a set of instances of class RuntimeTypes.
 
void * createInstanceFromName(const char *className) const
Returns a pointer to a newly created instance of the runtime type or NULL if such an instance cannot ...
 
void destroyRuntimeTypesOfDll(const char *dllName)
Deletes all RuntimeTypes from the runtime dictionary that belong to the DLL with name dllName.
 
std::vector< const RuntimeType * > getAllTypes()
Returns all registered types.
 
bool insert(const RuntimeType *runtimeType)
Inserts an new type into the runtime dictionary.
 
std::vector< const RuntimeType * > getAllDerivedFrom(const RuntimeType *parentType, bool onlyFromDifferentDlls=false)
Returns a list of all runtime types derived from parentType.
 
RuntimeDict()
Creates a new dictionary.
 
void clear()
Clears all dictionary entries and stored runtime types.
 
bool remove(const char *className)
Removes the element for the given className className.
 
~RuntimeDict()
Destructor. Removes the dictionary and all stored runtime types.
 
const RuntimeType * get(const char *className) const
Returns the runtime type for a given className (or NULL if not element present).
 
std::vector< const RuntimeType * > getAllRuntimeTypesOfDll(const char *dllName)
Returns a list of all runtime types implemented by DLL with name dllName.
 
RuntimeType contains type and inheritance information of a class and a static dictionary with informa...