| 105 | } |
| 106 | |
| 107 | void Type::importModule(std::string_view typeName) |
| 108 | { |
| 109 | // cut out the module name |
| 110 | const std::string mod = getModuleName(typeName); |
| 111 | |
| 112 | // ignore base modules |
| 113 | if (mod == "App" || mod == "Gui" || mod == "Base") { |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | // remember already loaded modules |
| 118 | if (loadModuleSet.contains(mod)) { |
| 119 | return; |
| 120 | } |
| 121 | |
| 122 | // lets load the module |
| 123 | Interpreter().loadModule(mod.c_str()); |
| 124 | #ifdef FC_LOGLOADMODULE |
| 125 | Console().log("Act: Module %s loaded through class %s \n", mod.c_str(), typeName); |
| 126 | #endif |
| 127 | loadModuleSet.insert(mod); |
| 128 | } |
| 129 | |
| 130 | std::string Type::getModuleName(std::string_view className) |
| 131 | { |
nothing calls this directly
no test coverage detected