13#ifndef ML_RUNTIME_DICT_H
14#define ML_RUNTIME_DICT_H
26#include <unordered_map>
107 std::unordered_map<std::string, const RuntimeType*> _dict;
This file declares the class RuntimeDict, which 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 which belong to the 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 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 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...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.