| 92 | } |
| 93 | |
| 94 | void* Type::createInstanceByName(std::string_view typeName, bool loadModule) |
| 95 | { |
| 96 | // if not already, load the module |
| 97 | if (loadModule) { |
| 98 | importModule(typeName); |
| 99 | } |
| 100 | |
| 101 | // now the type should be in the type map |
| 102 | const Type type = fromName(typeName); |
| 103 | // let createInstance handle isBad check |
| 104 | return type.createInstance(); |
| 105 | } |
| 106 | |
| 107 | void Type::importModule(std::string_view typeName) |
| 108 | { |
nothing calls this directly
no test coverage detected