| 106 | } |
| 107 | |
| 108 | bool PythonPluginInstance_Impl::findPluginClassNameInFile(const std::string& pluginClassName) const { |
| 109 | auto validClassNames = validPluginClassNamesInFile(); |
| 110 | auto it = std::find(validClassNames.cbegin(), validClassNames.cend(), pluginClassName); |
| 111 | if (it == validClassNames.cend()) { |
| 112 | std::stringstream ss; |
| 113 | ss << "["; |
| 114 | bool firstTime = true; |
| 115 | for (const auto& className : validClassNames) { |
| 116 | if (firstTime) { |
| 117 | ss << "\"" << className << "\""; |
| 118 | firstTime = false; |
| 119 | } else { |
| 120 | ss << ", \"" << className << "\""; |
| 121 | } |
| 122 | } |
| 123 | ss << "]"; |
| 124 | LOG(Warn, pluginClassName << " not found. validClassNames=" << ss.str()); |
| 125 | return false; |
| 126 | } |
| 127 | |
| 128 | return true; |
| 129 | } |
| 130 | |
| 131 | std::vector<std::string> PythonPluginInstance_Impl::validPluginClassNamesInFile() const { |
| 132 | std::vector<std::string> result; |
no test coverage detected