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

Method onAttributeChange

valdi/src/valdi/runtime/Context/Context.cpp:149–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void Context::onAttributeChange(RawViewNodeId viewNodeId,
150 const StringBox& attributeName,
151 const Value& attributeValue,
152 bool shouldNotifySync) {
153 Ref<ContextHandler> handler;
154 auto notifySync = false;
155
156 {
157 std::lock_guard<Mutex> guard(_mutex);
158 if (_handler == nullptr) {
159 return;
160 }
161 handler = _handler;
162 notifySync = _updateHandlerSynchronously;
163 }
164
165 handler->onAttributeChange(
166 strongSmallRef(this), viewNodeId, attributeName, attributeValue, shouldNotifySync || notifySync);
167}
168
169void Context::onRuntimeIssue(const StringBox& message, bool isError) {
170 Ref<ContextHandler> handler;

Callers 2

setValueForAttributeMethod · 0.45
valueChangedMethod · 0.45

Calls 1

strongSmallRefFunction · 0.85

Tested by

no test coverage detected