MCPcopy Create free account
hub / github.com/Snapchat/Valdi / registerTypeConverter

Method registerTypeConverter

valdi/src/valdi/runtime/RuntimeManager.cpp:295–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293 // Register the ModuleFactories to the existing Runtimes
294 for (const auto& runtime : runtimes) {
295 for (const auto& moduleFactory : moduleFactories) {
296 runtime->registerNativeModuleFactory(moduleFactory);
297 }
298 }
299}
300
301void RuntimeManager::registerTypeConverter(const StringBox& className, const StringBox& functionPath) {
302 std::vector<SharedRuntime> runtimes;
303 {
304 std::lock_guard<Mutex> guard(_mutex);
305 auto& it = _registeredTypeConverters.emplace_back();
306 it.className = className;
307 it.functionPath = functionPath;
308 runtimes = getAllRuntimes(guard);
309 }
310
311 // Register the TypeConverter to the existing Runtimes
312 for (const auto& runtime : runtimes) {

Callers 1

createRuntimeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected