| 19 | namespace py = pybind11; |
| 20 | |
| 21 | void InitCppMicroServices(py::module_& m) |
| 22 | { |
| 23 | m.def("get_loaded_modules", []() { |
| 24 | std::vector<std::string> names; |
| 25 | for (auto* module : us::ModuleRegistry::GetLoadedModules()) |
| 26 | names.push_back(module->GetName()); |
| 27 | return names; |
| 28 | }, |
| 29 | R"(Return the names of all currently loaded CppMicroServices modules. |
| 30 | |
| 31 | In the standalone wheel, this is the list of MITK modules whose auto-load |
| 32 | shared libraries have been loaded by the CppMicroServices runtime |
| 33 | (typically IO readers/writers and similar plug-in services). |
| 34 | |
| 35 | Returns: |
| 36 | A list of module name strings. |
| 37 | |
| 38 | Examples: |
| 39 | >>> for name in mitk.get_loaded_modules(): |
| 40 | ... print(name) |
| 41 | )"); |
| 42 | } |
no test coverage detected