Prev - Next - Down | SDMetrics - the UML design measurement tool |
The following example uses the "filtervalue" procedure to access the data value of a particular tagged value pair. We assume elements of type "taggedvalue" have two metrics "TagName" and "TagData", which yield the name and data value of the tagged value, respectively.
<metric name="Author" domain="class"> <description>Author of the class.</description> <filtervalue relation="context" target="taggedvalue" condition="tagName='Author'" value="tagData"/> </metric>The above metric takes the first tagged value with tag name 'Author' that it finds, evaluates the expression specified by the "value" attribute for that tagged value, and returns the result of that expression as the result of the metric.
The "filtervalue" procedure has the following attributes:
Prev | Up | Next |
Section 8.1.6 "Connected Components" | Contents | Section 8.1.8 "Subelements" |