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

Method resolveAttribution

valdi/src/valdi/runtime/Context/AttributionResolver.cpp:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36AttributionResolver::~AttributionResolver() = default;
37
38Attribution AttributionResolver::resolveAttribution(const StringBox& moduleName) {
39 const auto& it = _mapping.find(moduleName);
40 if (it == _mapping.end()) {
41 if (!moduleName.isEmpty()) {
42 VALDI_WARN(_logger, "Could not resolve attribution for module '{}'", moduleName);
43 }
44 return AttributionResolver::getDefaultAttribution();
45 }
46
47 return Attribution(moduleName, it->second.owner, it->second.callback);
48}
49
50VALDI_ATTRIBUTION_FN(valdi, runtime);
51

Callers 1

createContextMethod · 0.80

Calls 4

AttributionClass · 0.85
endMethod · 0.65
findMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected