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

Method resetAttribute

valdi/src/valdi/runtime/Attributes/AttributeHandler.cpp:139–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139void AttributeHandler::resetAttribute(ViewTransactionScope& viewTransactionScope,
140 ViewNode& viewNode,
141 const SharedAnimator& animator) const {
142 SC_ASSERT(!requiresView() || viewNode.hasView());
143 SC_ASSERT(_delegate != nullptr, "AttributeHandler::resetAttribute called with null delegate");
144
145 if (_delegate == nullptr) {
146 return;
147 }
148
149 _delegate->onReset(viewTransactionScope, viewNode, viewNode.getView(), _name, animator);
150}
151
152void AttributeHandler::appendPreprocessor(Result<Value> (*preprocessor)(const Value&), bool isTrivial) {
153 appendPreprocessor(AttributePreprocessor(preprocessor), isTrivial);

Callers 1

updateMethod · 0.45

Calls 3

hasViewMethod · 0.80
onResetMethod · 0.45
getViewMethod · 0.45

Tested by

no test coverage detected