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

Method getIdAndPathString

valdi_core/src/valdi_core/cpp/Context/ContextBase.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32std::string ContextBase::getIdAndPathString() const {
33 if (_path.isEmpty()) {
34 if (!_scopeName.isEmpty()) {
35 return fmt::format("id {} in scope '{}'", _contextId, _scopeName.slowToString());
36 }
37 return fmt::format("id {}", _contextId);
38 } else {
39 return fmt::format("id {} with component path {}", _contextId, _path.toString());
40 }
41}
42
43void ContextBase::withAttribution(const AttributionFunctionCallback& handler) const {
44 _attribution.fn(handler);

Callers 2

getFunctionMethod · 0.80
getJsValueMethod · 0.80

Calls 3

slowToStringMethod · 0.80
toStringMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected