| 105 | /// the specified criteria predicate function. |
| 106 | template <typename Description> |
| 107 | static bool anyFeatureDescriptionOfDescription(const Description &description, |
| 108 | std::function<bool(const Specification::FeatureDescription& fd)> criteria) { |
| 109 | for (const auto& fd: description.input()) { |
| 110 | if (criteria(fd)) { |
| 111 | return true; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | for (const auto& fd: description.output()) { |
| 116 | if (criteria(fd)) { |
| 117 | return true; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | for (const auto& fd: description.state()) { |
| 122 | if (criteria(fd)) { |
| 123 | return true; |
| 124 | } |
| 125 | } |
| 126 | return false; |
| 127 | } |
| 128 | |
| 129 | /// A utility function to invoke a handler with input, output, and |
| 130 | /// state feature description of the model. |
no outgoing calls
no test coverage detected