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

Method getResolvedValue

valdi/src/valdi/runtime/Attributes/ViewNodeAttribute.cpp:207–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205 _hasAppliedValue = true;
206}
207
208Value ViewNodeAttribute::getResolvedValue() const {
209 if (_hasSingleAttribute) {
210 return getSingleAttributeValue().value;
211 } else if (_hasAttributeCollection) {
212 const auto& attributeCollection = getAttributeValueCollection();
213 if (attributeCollection.values.empty()) {
214 return Value::undefined();
215 }
216
217 SC_ASSERT(attributeCollection.resolvedValueIndex < attributeCollection.values.size());
218 return attributeCollection.values[attributeCollection.resolvedValueIndex].value;
219 } else {
220 return Value::undefined();
221 }
222}
223
224AttributeValue* ViewNodeAttribute::getActiveAttributeValue() {

Callers 4

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected